Problem
When using a paid API plan (e.g. Z.AI Coding Plan, Claude Max, OpenAI), all tool calls consume the same model quota regardless of complexity. A web search, file grep, or browser action costs the same credits as complex reasoning or multi-file refactoring. There is no way to route lightweight tools to a cheaper/faster model while keeping the flagship model for hard tasks.
Concrete example with Z.AI Coding Plan credits:
| Tool type |
Typical token cost |
Model needed |
| File search / grep |
2k-10k tokens |
Any |
| Web search |
1k-5k tokens |
Any |
| Browser navigation |
2k-10k tokens |
Any |
| Multi-file refactor |
50k-200k tokens |
Flagship |
| Complex debugging |
50k-100k tokens |
Flagship |
Routing the first three rows to GLM-4.7 instead of GLM-5.2 saves ~15% credits per call on Z.AI. Over a week of agentic coding, this can meaningfully extend the weekly quota.
Proposed feature
Add a [[tools.model_override]] config table that routes specific tools to a different provider/model:
# Default model for all tools
# (set via provider/model selection as today)
# Override: route specific lightweight tools to a cheaper model
[[tools.model_override]]
tools = ["agentgrep", "websearch", "webfetch", "browser"]
provider = "zai-coding-plan"
model = "GLM-4.7"
# Keep heavy tools on the flagship
# (implicitly uses the default model)
Behavior
- When the agent decides to call a tool in the override list, that single tool call is sent to the overridden model/provider instead of the session model.
- Tool call inputs and outputs are still injected into the main conversation history for the primary model.
- The override applies to the tool execution itself (choosing parameters, interpreting results), not to the model deciding which tool to call.
- Falls back to the primary model if the override provider is unavailable.
Edge cases to consider
- Should MCP tool calls be overridable separately?
- Should there be a per-override concurrency limit to avoid hammering the cheaper provider?
- How does this interact with compaction (which model summarizes)?
- Swarm workers already support per-agent model selection. This feature is the single-agent analogue.
Alternatives considered
- Manual model switching (Ctrl+Tab): Works but tedious and error-prone. Users forget to switch back.
- Swarm delegation: Works for bulk search tasks but overkill for a single web search. Adds latency and complexity.
- Prompt engineering: Asking the model to "use tools sparingly" reduces calls but does not change per-call cost.
Who benefits
Any user on a metered or flat-fee API plan who wants to maximize their quota by reserving expensive model capacity for tasks that actually need it. Especially relevant for Z.AI Coding Plan users (Lite/Pro/Max) and Claude Max users who hit weekly caps.
Problem
When using a paid API plan (e.g. Z.AI Coding Plan, Claude Max, OpenAI), all tool calls consume the same model quota regardless of complexity. A web search, file grep, or browser action costs the same credits as complex reasoning or multi-file refactoring. There is no way to route lightweight tools to a cheaper/faster model while keeping the flagship model for hard tasks.
Concrete example with Z.AI Coding Plan credits:
Routing the first three rows to GLM-4.7 instead of GLM-5.2 saves ~15% credits per call on Z.AI. Over a week of agentic coding, this can meaningfully extend the weekly quota.
Proposed feature
Add a
[[tools.model_override]]config table that routes specific tools to a different provider/model:Behavior
Edge cases to consider
Alternatives considered
Who benefits
Any user on a metered or flat-fee API plan who wants to maximize their quota by reserving expensive model capacity for tasks that actually need it. Especially relevant for Z.AI Coding Plan users (Lite/Pro/Max) and Claude Max users who hit weekly caps.