Skip to content

fix(test-page): match hyphenated model catalog ids - #193

Merged
TheSmallHanCat merged 2 commits into
TheSmallHanCat:mainfrom
verssache:fix/test-page-model-categories
Oct 29, 2026
Merged

TheSmallHanCat merged 2 commits into
TheSmallHanCat:mainfrom
verssache:fix/test-page-model-categories

Conversation

@verssache

Copy link
Copy Markdown
Contributor

Problem

The model tester at /test filtered the /v1/models catalog with legacy underscore prefixes (veo_3_1_t2v, veo_3_1_i2v, veo_3_1_r2v, gemini-3.0-pro-image). The catalog actually exposes hyphenated ids (veo-3.1-*, omni-1.1-flash-*), so no video id matched any category filter and every video section vanished from the sidebar — including Omni 1.1 Flash.

The bug does not stop at the sidebar: getModelMeta() looked for i2v / r2v substrings, which never appear in the hyphenated ids either, so the image uploader was hidden for I2V, R2V and Omni — the exact models that need a reference image.

Backend is unaffected: /v1/models lists 82 models (9 omni-1.1-flash-*) and /v1/chat/completions with omni-1.1-flash-4s-landscape generates video normally.

Fix

  • Single classifyModel() classifier (image / upsample / i2v / r2v / omni / extend / t2v), normalizing _ to - so legacy ids keep working.
  • MODEL_CATEGORIES, getModelType() and getModelMeta() all derive from it; Omni gets the reference-image uploader (0–3 images).
  • New Omni 1.1 Flash 视频 and 视频续写 (Extend) sections with zh-CN/en locale keys.
  • Omni entries seeded in FALLBACK_MODELS.

Verification

  • Sidebar with a valid API key now renders 8 categories: Omni 9, I2V 12, R2V 4, Extend 6, no empty sections.
  • Selecting omni-1.1-flash-4s-landscape shows the uploader labelled 0-3 images and a 🎬 Generate video button.
  • End-to-end through the UI: video generated in 45.1s and played back in the result <video> element.
  • pytest tests: 252 passed, 14 skipped.

verssache and others added 2 commits October 28, 2026 19:13
The tester sidebar filtered /v1/models with legacy underscore prefixes
(veo_3_1_t2v, veo_3_1_i2v, veo_3_1_r2v) while the catalog exposes
hyphenated ids (veo-3.1-*, omni-1.1-flash-*). No video id matched, so
every video section disappeared from the sidebar, Omni included.

Classify models once through classifyModel(), normalizing underscores to
hyphens so legacy ids still work, and reuse it for the sidebar filter,
the type tag and getModelMeta(). Omni reference video needs the image
uploader, which the old i2v/r2v substring checks missed entirely.

Add the Omni and Extend sections plus their locale keys, and seed Omni
entries in the fallback catalog.
Keep I2V/R2V reference uploads for upsample aliases and restore the
legacy R2V 1080P fallback model.

Add a localized source media ID input for Extend models and serialize
it using the existing extend:// message contract. Restore Upsample
translations and add browser regression coverage for model and language
switching.

Validation: 37 i18n/browser tests, Ruff, inline JavaScript syntax,
locale key parity, and git diff --check.
@TheSmallHanCat
TheSmallHanCat merged commit b410e37 into TheSmallHanCat:main Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants