Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By alexandernicholsonv0.17.1MITIn 1 marketplace
Assigns a specific model to each subagent role and shows which model each delegated call requested, resolved, and actually used. Needs Claude Code function hooks enabled and an explicitly configured Anthropic-compatible endpoint; Node.js 22 or newer.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
1 critical · 1 caution to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it sees, changes or blocks tool calls; runs programs; reads environment variables (ANTHROPIC_BASE_URL, CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS, CLAUDE_CODE_SUBAGENT_MODEL); sets environment variables; reads your settings; changes your /config settings.
A command runs shell commands (! syntax) when you invoke it
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Task modeltask_model
Choose the task and native Plan model with /agent-models, or enter an exact model ID.
stringOptional
Scout modelscout_model
Choose the scout's model with /agent-models, or enter an exact model ID.
stringOptional
Sonic modelsonic_model
Choose the sonic model with /agent-models, or enter an exact model ID.
stringOptional
Task efforttask_effort
Reasoning effort for the task role. Default keeps the engine's effort; models without effort support ignore it.
One of default, low, medium, high, xhigh, max
stringOptionaldefault default
Scout effortscout_effort
Reasoning effort for the scout role. Default keeps the engine's effort; models without effort support ignore it.
One of default, low, medium, high, xhigh, max
stringOptionaldefault default
Sonic effortsonic_effort
Reasoning effort for the sonic role. Default keeps the engine's effort; models without effort support ignore it.
One of default, low, medium, high, xhigh, max
stringOptionaldefault default
Reviewer modelreviewer_model
Choose the reviewer's model with /agent-models, or enter an exact model ID.
stringOptional
Teammate modelteammate_model
Model for agent team teammates in place of their role's model. Choose with /agent-models; leave empty to use each role's model.
stringOptional
Reviewer effortreviewer_effort
Reasoning effort for the reviewer role. Default keeps the engine's effort; models without effort support ignore it.
One of default, low, medium, high, xhigh, max
stringOptionaldefault default
Teammate effortteammate_effort
Reasoning effort for agent team teammates. Default keeps each role's effort; models without effort support ignore it.
One of default, low, medium, high, xhigh, max
stringOptionaldefault default
Security reviewer modelsecurity_reviewer_model
Choose the security reviewer's model with /agent-models, or enter an exact model ID.
stringOptional
Security reviewer effortsecurity_reviewer_effort
Reasoning effort for the security reviewer role. Default keeps the engine's effort; models without effort support ignore it.
One of default, low, medium, high, xhigh, max
stringOptionaldefault default
Agent Router is a Claude Code Mod that assigns an exact model to each subagent role. It connects Claude Code's delegation workflow to the models offered by your Anthropic-compatible endpoint and records the routing decisions and completed-turn usage locally.
Explore and general-purpose calls to OMP-derived roles, and select the task model for Claude's built-in Plan agent.agent.spawn and maintain them through child turn.step requests./agent-router:routes.PATH.GET /v1/models./agent-models.Remote endpoints use HTTPS. Local endpoints can use HTTP on loopback addresses, including localhost, 127.0.0.1, and ::1.
Use your existing Claude Code environment configuration to set ANTHROPIC_BASE_URL and the credentials required by your endpoint. For example, replace this reserved example URL with your endpoint:
export ANTHROPIC_BASE_URL="https://gateway.example"
export CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1
claude
Agent Router activates routing when ANTHROPIC_BASE_URL is set. An explicit https://api.anthropic.com endpoint is supported as well.
Model discovery reads these standard environment variables:
| Variable | Purpose |
|---|---|
ANTHROPIC_BASE_URL | Base URL of the Anthropic-compatible API |
ANTHROPIC_API_KEY | Sends the x-api-key header when supplied |
ANTHROPIC_AUTH_TOKEN | Sends a bearer Authorization header when supplied |
ANTHROPIC_CUSTOM_HEADERS | Adds service-specific headers; nonempty values override matching headers case-insensitively |
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY | Enables Claude-compatible gateway discovery and includes the endpoint-matched native cache |
For an Anthropic-format gateway with gateway discovery enabled, requests identify the integration with User-Agent: claude-code/agent-router. This lets client-aware gateways advertise their custom models on first startup. Other discovery requests use agent-router. Services with a specific client-header requirement can override the header through ANTHROPIC_CUSTOM_HEADERS. Endpoints that allow unauthenticated discovery can use their own authentication policy.
With CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1, Agent Router combines fresh endpoint results with Claude Code's gateway discovery cache. This preserves models discovered using Claude's resolved credentials, including apiKeyHelper, while retaining non-Claude models from the endpoint. Fresh metadata takes precedence for duplicate IDs. If direct discovery fails, the matching cached models remain available.
Claude Code owns ~/.claude/cache/gateway-models.json; CLAUDE_CONFIG_DIR selects its configuration root. Agent Router reads that cache for the same endpoint and provider mode. Fresh gateway discovery also works before Claude has populated the cache.
Keep credentials in your local environment or secret-management system.
Gateway-specific credential variable names need to be mapped to ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or the gateway's required custom headers. CLAUDE_CODE_OAUTH_TOKEN selects Claude sign-in credentials; gateway model discovery uses the credential sources listed above.
For HTTP 401 or 403, the picker reports whether x-api-key and Authorization were supplied, with their values kept private. Check the affected session's launch environment and its permission to call GET /v1/models. With CVM/CVP, put the gateway credentials in the active profile, then start a fresh Claude session. A server error from the endpoint's /v1/models is retried twice, half a second and then a second apart, before discovery fails. Discovery failures preserve the saved role settings and show the catalog as unavailable.
7-day copy clicks
npx claudepluginhub alexandernicholson/agent-router --plugin agent-routerPlugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.