fix(normalize): treat ready container-slot models as loaded (cutover routing)#678
Merged
Merged
Conversation
Cutover (#662) final routing gap. _normalize_loaded_models derived the "loaded" set purely from lemond's health snapshot. Container slots aren't lemond-managed, so their models (chadrock-35b-ace-saber, qwopus3.6-27b-v2) never appeared loaded — and resolve_chain only matches a role whose model is loaded, so EVERY hal0/* name fell back to the configured primary (chat). hal0/chat only "worked" by coincidence; hal0/agent wrongly served chat. Union the lemond loaded set with the models advertised by ready container remotes (kind="remote" + slot_name). Genuine external remotes (no slot_name, e.g. OpenRouter) are excluded — they aren't local slots. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 9, 2026
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.
Why
hal0/agentserved the chat model. Root cause:_normalize_loaded_modelsbuilt the "loaded" set from lemond's health snapshot only. Container slots aren't lemond-managed, sochadrock-35b-ace-saber/qwopus3.6-27b-v2were never "loaded" — andresolve_chainonly matches a role whose model is loaded, so everyhal0/*name fell back to the configured primary (chat).hal0/chatworked by coincidence;hal0/agentwrongly resolved to chat.Fix
Union lemond's loaded set with the catalogs advertised by ready container remotes (
kind="remote"+slot_name). Genuine external remotes (noslot_name, e.g. OpenRouter) are excluded.Tests
TDD:
test_loaded_models_includes_ready_container_slots(+ excludes a real remote). 45 passed; ruff clean.Completes correct
hal0/agentresolution. Relates to #652, #662.🤖 Generated with Claude Code