Cc Subagent Models — AI skill for Claude Code
Patch Claude Code's Agent tool to use any gateway model (9Router, LiteLLM, OpenRouter) per subagent call.
How to install Cc Subagent Models
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open TejasLamba2006/cc-subagent-models and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cc Subagent Models does
Patch Claude Code's Agent tool to use any gateway model (9Router, LiteLLM, OpenRouter) per subagent call.
Alternatives in AI
- Zen MCP Server — The power of Claude Code + Gemini / OpenAI / Grok / OpenRouter / Ollama / Custom Model working as one 11.3k ★
- Open Multi Agent — TypeScript multi-agent orchestration engine — one runTeam() call from goal to result 5.8k ★
- Axonhub — ⚡️ Open-source AI Gateway — Use any SDK to call 100+ LLMs 3.2k ★
README
cc-subagent-models
If you run Claude Code through a gateway like 9Router, LiteLLM, or OpenRouter, you already have access to dozens of models. The problem is that Claude Code's built-in `Agent` tool won't let you use them for subagents.
Inside Claude Code, the `model` field on the `Agent` tool is locked to a hardcoded Zod enum (`["sonnet", "opus", "haiku"]` or `["sonnet", "opus", "haiku", "fable"]`). Even if you bypass the schema, the internal model resolver checks the string against an allowlist and drops unknown model IDs right back to the parent session model.
`cc-subagent-models` patches Claude Code once so the lead model can pick any model on your gateway per subagent call. You can send file searches to a fast free Qwen model, unit tests to GLM, and hard debugging to DeepSeek Reasoner without changing your main session model.
npx cc-subagent-models sync --gateway http://localhost:20128/v1/models
npx cc-subagent-models patch --mode free
How it works
Instead of baking a static model list into `cli.js`, the patcher injects a small runtime helper (`globalThis.__ccSubagentModelSchema`) and rewrites the subagent model resolver to pass non-Anthropic model strings straight through to `req.body.model`.
Every time you start `claude`, that helper reads `~/.claude/subagent-models.json` on the fly. When you add a provider in 9Router or edit your routing hints, you do not need to re-patch Claude Code. The next session picks up the new list automatically.
It works on both installation formats:
- Standard npm
cli.jsbundles (@anthropic-ai/claude-code). - Bun-compiled native binaries (
~/.local/bin/claudeorclaude.exe) whentweakcc(node-lief) is present in your local cache.
Before writing anything, the patcher saves a `.cc-backup` copy of your installation and runs `node --check` on JS bundles. If the syntax check fails, it restores the backup immediately.
Quick start
1. Curate your subagent models (or sync from your g
Related Skills
Gateswitch
Model & gateway switcher for AI coding tools: use any OpenAI/Anthropic-compatible gateway (LiteLLM, OpenRouter
Free LLM Gateway
Local LiteLLM gateway aggregating free LLM providers (Zhipu/SiliconFlow/OpenRouter/NVIDIA/Agnes/SenseNova/dots
Llmix
Production LLM call layer for AI agents and tools: keep OpenAI/Anthropic/AI SDK/LiteLLM, hot-swap models with
BrighTO Router
BrighTO LLM Router: free open-source, ultra-fast Rust LLM gateway/router and LiteLLM/Bifrost alternative with
9router Model Select Tool
Cross-platform desktop app for discovering 9router models and safely configuring Claude Code, Codex, OpenCode,
Sidequest
Cut Claude Code token costs by delegating bulk LLM work to cheap models. 600+ models via NanoGPT, OpenRouter,
Related Agents
Effort Max
Pins MAX reasoning effort; pair with a per-call model param (top-tier models only). Last resort for a single h
Provider Presets
Owns the fixed three-way provider split (packages/aitm/src/config/provider-presets.ts, src/credentials, src/op
Openrouter Agent
Runs a model from any of ~60 vendors through OpenRouter's OpenAI-compatible endpoint, billed per token against