fix(normalize): add hal0/agent virtual name to resolver chain (cutover routing)#677
Merged
Merged
Conversation
Cutover (#662) gap: DEFAULT_CHAINS had hal0/chat, hal0/npu, hal0/utility but no hal0/agent. So resolve_chain("hal0/agent") returned None → the chat normalizer left the raw "hal0/agent" in the body → dispatcher found no match → lemonade 404 (model_not_found). hal0/chat worked only because it was mapped. Add "hal0/agent": ("agent", "chat") — resolves to the slot named/tagged "agent" (the GPU MoE agent slot per the cutover), falling back to chat when unloaded. Role match is name/role-based, so it binds the GPU agent slot regardless of the legacy agent-as-NPU seed grouping. 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/agentrequests 404 whilehal0/chatworks.DEFAULT_CHAINSin the chat normalizer hadhal0/chat,hal0/npu,hal0/utility— but nohal0/agent. Soresolve_chain("hal0/agent")returnsNone, the rawhal0/agentpasses through unnormalized, the dispatcher finds no match, and it falls through to lemonade →model_not_found. (hal0/chatworks only because it's mapped.)This is the functional tail of the
agent-as-NPU seed grouping:agentwas never made a first-class GPU chat role.Fix
Add
"hal0/agent": ("agent", "chat"). Resolves to the slot named/taggedagent(the GPU MoE agent slot), falling back tochatwhen unloaded. Role match is name/role-based, so it binds the GPU agent slot regardless of the legacy NPU seed grouping.Tests
TDD:
test_agent_virtual_name_resolves_to_agent_slot. 33 passed; ruff clean.Completes
hal0/agentrouting for the cutover. Relates to #652, #662.🤖 Generated with Claude Code