t1k:model-router:delegate
| Field | Value |
|---|---|
| Module | model-router |
| Version | 3.17.12 |
| Effort | low |
| Tools | — |
Keywords: cheap model, delegate, glm, intercept, kimi, model-mapping, opencode, route, route to cheap, subagent, swap model
How to invoke
Section titled “How to invoke”/t1k:model-router:delegate<agent-name> "<task>" --provider <provider> --model <model>How v2 Works
Section titled “How v2 Works”The kit no longer ships shim agents. The delegation contract is:
bash .claude/scripts/mr-delegate.sh <agent-name> "<task>" --provider <provider> --model <model>The script:
- Discovers
.claude/agents/<agent-name>.md(cwd →CLAUDE_PROJECT_DIR→~/.claude/agents). - Reads frontmatter for
permissionMode/maxTurns/maxBudgetUsd(fallback:plan/ 25 / $5). - Runs
claude -p --agent <name> --model <chosen-cheap-model>against the chosen provider. - 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 succeededEngine-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.
# Force opencode-go/glm-5.1 for a heavy review, bypassing any modelMapping defaultsbash .claude/scripts/mr-delegate.sh t1k-code-reviewer \ "audit src/auth/ for OWASP Top 10" \ --provider opencode-go --model glm-5.1Model + Provider Selection
Section titled “Model + Provider Selection”When you call the explicit form, YOU pick (provider, model). When the interceptor fires, the mapping picks for you.
- Read
.claude/model-capabilities.mdfor model strengths/costs. - Read
.claude/providers-config.jsonfor available providers. - Choose the best (provider, model) for task complexity.
Pass via --provider <provider> --model <model> flags. Both required — no defaults.
Model Quick Reference
Section titled “Model Quick Reference”| Need | Model | Provider | Why |
|---|---|---|---|
| Cheapest possible | qwen3.5-plus | opencode-go | 10K req/5hr, basic quality |
| Best balance | kimi-k2.6 | kimi or opencode-go | Good quality + reasonable cost |
| Best reasoning | glm-5.1 | opencode-go | Complex tasks, worth the cost |
| Long context (1M) | minimax-m2.7 | opencode-go | Large file analysis |
| Fast prototyping | mimo-v2-pro | opencode-go | Quick code generation |
Full details: read .claude/model-capabilities.md.
Safety
Section titled “Safety”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_SPAWNEDguard 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).
excludeAgentslist int1k-config-mr.json— any agent here is never intercepted (e.g.t1k-architect,t1k-plannerfor tasks that genuinely need Opus).
Logs & Telemetry
Section titled “Logs & Telemetry”- Local logs:
~/.model-router/calls.jsonl(carries the agent name). - Tool usage:
~/.model-router/tool-usage.jsonl. - Worker schema: the existing
rolecolumn 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.