Skip to content

t1k:model-router:delegate

FieldValue
Modulemodel-router
Version3.17.12
Effortlow
Tools

Keywords: cheap model, delegate, glm, intercept, kimi, model-mapping, opencode, route, route to cheap, subagent, swap model

/t1k:model-router:delegate
<agent-name> "<task>" --provider <provider> --model <model>

The kit no longer ships shim agents. The delegation contract is:

Terminal window
bash .claude/scripts/mr-delegate.sh <agent-name> "<task>" --provider <provider> --model <model>

The script:

  1. Discovers .claude/agents/<agent-name>.md (cwd → CLAUDE_PROJECT_DIR~/.claude/agents).
  2. Reads frontmatter for permissionMode / maxTurns / maxBudgetUsd (fallback: plan / 25 / $5).
  3. Runs claude -p --agent <name> --model <chosen-cheap-model> against the chosen provider.
  4. Returns the agent’s text output.

Primary call path is the Task interceptor (hooks/mr-task-interceptor.cjs), not this skill. The flow:

main session → Task(subagent_type="t1k-unity-dots-core-implementer", prompt="...")
PreToolUse hook reads the agent's `model:` frontmatter
matches modelMapping["claude-opus-4-7"] → { kimi, kimi-k2.6 }
hook denies the Task, runs mr-delegate.sh, returns output as systemMessage
main session sees the cheap result as if Task had succeeded

Engine-kit specialization is preserved: the Unity DOTS agent’s full prompt + tools run, just on Kimi instead of Opus.

When to Use the Explicit Form (this skill)

Section titled “When to Use the Explicit Form (this skill)”

Most delegation happens automatically via the Task interceptor. Call /t1k:model-router:delegate explicitly only when:

  • You’re outside a Task spawn (e.g. running mechanical work from a Bash hook script).
  • You want to force a specific (provider, model) that overrides modelMapping.
  • You’re debugging — explicit invocation surfaces the full mr-delegate.sh output.
Terminal window
# Force opencode-go/glm-5.1 for a heavy review, bypassing any modelMapping defaults
bash .claude/scripts/mr-delegate.sh t1k-code-reviewer \
"audit src/auth/ for OWASP Top 10" \
--provider opencode-go --model glm-5.1

When you call the explicit form, YOU pick (provider, model). When the interceptor fires, the mapping picks for you.

  1. Read .claude/model-capabilities.md for model strengths/costs.
  2. Read .claude/providers-config.json for available providers.
  3. Choose the best (provider, model) for task complexity.

Pass via --provider <provider> --model <model> flags. Both required — no defaults.

NeedModelProviderWhy
Cheapest possibleqwen3.5-plusopencode-go10K req/5hr, basic quality
Best balancekimi-k2.6kimi or opencode-goGood quality + reasonable cost
Best reasoningglm-5.1opencode-goComplex tasks, worth the cost
Long context (1M)minimax-m2.7opencode-goLarge file analysis
Fast prototypingmimo-v2-proopencode-goQuick code generation

Full details: read .claude/model-capabilities.md.

Every delegation enforces:

  • Tool whitelist from the agent’s own frontmatter (Claude Code respects tools: / disallowedTools:).
  • Permission mode read from agent frontmatter; safe fallback (plan) if missing.
  • Max turns from agent frontmatter; default 25 if missing.
  • Budget cap from agent frontmatter; default $5 if missing.
  • Timeout (5 minutes default).
  • No nested delegation (MR_SPAWNED guard at both the script and the interceptor).
  • Write lock (single write-capable agent at a time when mode=acceptEdits).
  • Telemetry (events sent to T1K cloud for monitoring).
  • excludeAgents list in t1k-config-mr.json — any agent here is never intercepted (e.g. t1k-architect, t1k-planner for tasks that genuinely need Opus).
  • Local logs: ~/.model-router/calls.jsonl (carries the agent name).
  • Tool usage: ~/.model-router/tool-usage.jsonl.
  • Worker schema: the existing role column carries the agent name (no migration).

See The1Studio/theonekit-model-router#42 for the v2 design rationale and #54 for the v3.3.0 kit-enforced Opus-family passthrough policy.