mr-transparent-routing
Model Router — Transparent Routing
Section titled “Model Router — Transparent Routing”Swaps the model running each subagent (identity, prompt, tools unchanged) for a cheap LLM. Reference (hop env, timeouts, allowance, Workflow agent()): docs/mr-transparent-routing.md.
Activation Check
Section titled “Activation Check”Inert unless .claude/t1k-config-mr.json has modelRouter.enabled: true and modelRouter.mode: "transparent", and no proxy endpoint — non-empty ANTHROPIC_BASE_URL (CCS, any Anthropic-API gateway) disables routing unless modelRouter.disableUnderAnthropicProxy is false. mr-task-interceptor.cjs (PreToolUse Task) then routes via modelMapping, DENIES the Task, substituting the cheap result.
Step 0 — MANDATORY pre-tool consult
Section titled “Step 0 — MANDATORY pre-tool consult”Before ANY inline Edit/Write/Bash mutating user files, ask: “Mechanical, boilerplate, or single-purpose?” Yes → Task with the narrowest specialist subagent_type. No → inline, saying why. Always inline: --parallel/multi-agent mode; orchestration judgment; MR_SPAWNED=1.
Routing floors
Section titled “Routing floors”Premium (opus/fable-family model:, or inherit) is always native; an unrecognized floor fails closed. perSpawnModelOverride never pierces a floor — run Opus-grade work inline. After PROVIDERS-EXHAUSTED only the identical re-spawn (same agent + brief) runs native; a model: override is still routed.
Security
Section titled “Security”A data-classification gate and backend allowlist cover every hop and fail toward Anthropic. Never re-word a blocked prompt to evade it.
Delegation Output
Section titled “Delegation Output”Read the body, not the Error: prefix (= success). ROUTED FAILED (exit <n>) = failure (read --- stderr ---): change the brief or re-spawn natively, never re-issue. ROUTED PARTIAL: re-spawn only REMAINING items. Exit 42 (exhausted): no banner. Sentinels: PENDING id=… re-wait; NOT-ROUTABLE unchanged; NOT-STARTED: mr-wait-memory.cjs, re-spawn the SAME agent, never native; full table in docs/mr-transparent-routing.md.