fix(models): restore full model listing in slot pickers (v0.9.2 hotfix)#1080
Merged
Conversation
/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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/modelsstamps each row'stype. The FLM path correctly emits the dispatcher vocabulary (llm/embedding/reranking) — the vocab slots use and the UI joins on (normalizeApiModel→model.type === slot.type). But the local-registry (models.pyL219) and upstream (L296) paths stampedtypewithclassify()'s coarse modality bucket (chat/embed/rerank). So every local model'stypewas"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 (coversimg→image, which_FLM_DISPATCH_TYPElacked)./api/modelsnow returnsllm/embedding/rerankingconsistently 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. Addstest_list_models_type_is_dispatcher_vocab_for_local_rowsasserting chat/vision →llm, rerank →reranking, embed →embeddingfor 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/modelstype counts wentchat:41/rerank:3/embed:2→llm:42/reranking:3/embedding:2; dropdowns repopulated.🤖 Generated with Claude Code