MoonshotAI / MoonshotAI/kimi-code
feat: support per-call model and thinking_level parameters in Agent and AgentSwarm tools
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What feature would you like to see?
With the release of Kimi K3 (which introduces variable thinking efforts: low, high, max) alongside models like K2.7 (kimi-for-coding / highspeed), subagent collaboration via Agent and AgentSwarm tools currently forces all child agents to inherit the parent session's default model and default thinking effort level.
In multi-agent architectures:
- Cost & Token Efficiency: Running every subagent on high thinking or K3 for simple tasks (such as single-file pattern searches, glob lookups, or minor formatting edits) consumes excessive context and reasoning tokens unnecessarily.
- Execution Speed: Lightweight tasks (e.g. codebase exploration) benefit from fast execution (
thinking_level: "low"ormodel: "kimi-for-coding-highspeed"), while complex architecture refactoring needsthinking_level: "high"or"max".
Proposed Solution
Add explicit optional parameters to Agent and AgentSwarm tool schemas:
thinking_level:z.enum(['off', 'low', 'medium', 'high', 'xhigh', 'max']).optional()— Overrides parent session thinking effort for the subagent call.model:z.string().optional()— Overrides parent session model / model alias for the subagent call (e.g.,"k3","kimi-for-coding-highspeed").
Precedence Resolution Chain
- Per-call tool argument:
args.thinking_level/args.model(highest precedence) - Subagent profile default:
profile.thinking_level/profile.model(e.g.,explore.yamlsettingthinking_level: low) - Parent session default:
parent.config.thinkingEffort/parent.config.modelAlias(fallback)
Additional information
- This enables coordinator agents to dynamically select model tiers and thinking depth based on task scope and complexity.
- We have validated this pattern in custom profile directory workflows (
--agents-dir), drastically reducing token consumption and latency in multi-agent swarms.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Agent and AgentSwarm tool schemas, then trace how subagent profiles and parent session defaults are resolved. Verify that per-call model and thinking_level values take precedence over profile and parent defaults, and confirm the schemas support the listed optional values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100