Skip to content

README: document smart routing for Claude Code and fix flag names - #281

Closed
masonc08 wants to merge 5 commits into
mainfrom
alpha
Closed

README: document smart routing for Claude Code and fix flag names#281
masonc08 wants to merge 5 commits into
mainfrom
alpha

Conversation

@masonc08

@masonc08 masonc08 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

We renamed the flag for enabling smart routing at somepoint but forgot to update the README, so we will do that now.

The flag was renamed from --enable-intelligent-routing to
--enable-smart-routing, and Claude Code smart routing was added
in #255. Update the README to match the actual CLI.

Co-authored-by: Isaac
@masonc08
masonc08 requested a review from tt-le August 6, 2026 22:31
Discovery's newest-wins family bucketing picks claude-opus-5 over
claude-opus-4-8, but CLAUDE_ROUTE_ARMS hardcodes claude-opus-4-8 — so
the routing availability check fails with 'required Claude routing
models are unavailable: claude-opus-4-8' on workspaces that have both.

Pin the opus slot to 4-8 when both exist so routing works with the
currently-deployed task_v1 router. Revert once the router accepts
opus-5 (PR databricks-eng/universe#2365446).
Claude Code's Agent tool model field only accepts short family names
(sonnet, opus, haiku, fable), not full workspace ids. The PreToolUse hook
was injecting the full id (e.g. system.ai.claude-sonnet-5) into
updatedInput.model, which Claude Code rejected with a schema validation
error. Map the router's pick back to its family name before injecting.
Claude Code's SubagentStart event does not include the subagent's model
field, so the reconciliation audit recorded model=null and reported a
false mismatch. When the actual model is unknown, record
matches_router_decision as None (unknown) rather than False (mismatch),
and emit no SubagentStart message to the user — the PreToolUse hook
already injected the routed model.
route_spawn_tool looked for message/task_name/agent_name to derive the
routing task, but Claude Code's Agent tool puts the subagent task in
prompt/description — so Claude always fell through to the generic
"Claude Code subagent task" label, and the router made decisions on a
constant string. Add prompt and description to the front of the field
fallback chain. Safe for Codex: its spawn_agent tool uses message, which
is absent from Claude payloads, and vice versa.
@masonc08 masonc08 closed this Aug 6, 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.

1 participant