Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(models): restore full model listing in slot pickers (v0.9.2 hotfix)#1080

Merged
thinmintdev merged 1 commit into
mainfrom
hotfix/model-type-dispatcher-vocab
Jul 5, 2026
Merged

fix(models): restore full model listing in slot pickers (v0.9.2 hotfix)#1080
thinmintdev merged 1 commit into
mainfrom
hotfix/model-type-dispatcher-vocab

Conversation

@thinmintdev

Copy link
Copy Markdown
Contributor

Hotfix — v0.9.2

Symptom

Every slot's model dropdown (create/edit/swap) and the model → compatible-slots list collapsed to only the currently-assigned model. Reported on the box after the 0.9.1 update.

Root cause

GET /api/models stamps each row's type. The FLM path correctly emits the dispatcher vocabulary (llm / embedding / reranking) — the vocab slots use and the UI joins on (normalizeApiModelmodel.type === slot.type). But the local-registry (models.py L219) and upstream (L296) paths stamped type with classify()'s coarse modality bucket (chat / embed / rerank). So every local model's type was "chat", which never equals a slot's "llm" → filtered out of every picker.

Fix

Map the modality bucket → dispatcher type at both stamp sites via a shared _dispatch_type() helper (covers imgimage, which _FLM_DISPATCH_TYPE lacked). /api/models now returns llm / embedding / reranking consistently across local, upstream, and FLM rows.

Test gap closed

The only type == "llm" assertion covered the FLM path (already correct) — nothing covered the local-registry path, which is how this shipped. Adds test_list_models_type_is_dispatcher_vocab_for_local_rows asserting chat/vision → llm, rerank → reranking, embed → embedding for local rows.

Versioning

Patch bump 0.9.1 → 0.9.2 — backward-compatible bug fix, no API or behaviour change (per the CHANGELOG's stated semver-pre-1.0 convention: patch releases inside a minor line carry no breaking changes).

Pre-flight

  • ruff check src tests ✓ · ruff format --check
  • pytest tests/api/test_models_routes.py ✓ (new regression test + existing FLM/ns tests pass)
  • gen_release_notes.py --tag v0.9.2 ✓ (1 highlight, not truncated)

Verified live on the box (hot-patched venv + restart): /api/models type counts went chat:41/rerank:3/embed:2llm:42/reranking:3/embedding:2; dropdowns repopulated.

🤖 Generated with Claude Code

/api/models stamped local- and upstream-registry rows' `type` with
classify()'s modality bucket (chat/embed/rerank) instead of the dispatcher
vocabulary (llm/embedding/reranking) the FLM path already emits and the UI
joins slots↔models on (model.type === slot.type). Every local model failed
the slot picker filter, so each slot's model dropdown collapsed to just its
currently-assigned model (and the model→slot compatibility list broke too).

Map the modality bucket → dispatcher type at both stamp sites via a shared
_dispatch_type() helper. Adds a local-row regression test — only the FLM
path (already dispatcher-correct) was covered, which is how this shipped.

Release: v0.9.2 (patch: backward-compatible bug fix, no API/behaviour change).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@thinmintdev thinmintdev merged commit 81685bc into main Jul 5, 2026
3 checks passed
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.

1 participant