MoonshotAI / MoonshotAI/kimi-code

Feature request: intelligent model and thinking-effort selection for delegated subagents

Open
#2,794 0 comments 0 reactions 0 assignees View on GitHub

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?

I would like Kimi Code to keep the main agent's selected model fixed for the session, while intelligently selecting an appropriate model and thinking effort for each delegated Subagent task.

This is not a request to switch the main conversation model back and forth between planning and execution. The main agent should remain the planner/orchestrator and preserve the session context. Execution work can be delegated to Subagents using models suited to each task.

Example workflow:

  • I start the session with 5.6 sol and thinking effort max as the main agent.
  • The main agent uses this model for understanding requirements, planning, coordinating work, and reviewing Subagent results.
  • When implementation begins, the main agent delegates coding work to a Subagent and automatically selects luna / max because it is suitable for that task.
  • A simple repository search might use a faster or cheaper model with a lower thinking effort.
  • A difficult debugging or review task might use a stronger model with high or max effort.
  • If execution reveals that a new plan is needed, the result returns to the unchanged main agent (5.6 sol / max), which creates the new plan and delegates the next tasks as needed.

The model names above are only example aliases. The feature should work with configured aliases across different providers.

Ideally, users could define an allowlisted pool of Subagent model profiles. For example (illustrative only):

[[subagent_model_profiles]]
name = "implementation"
model = "luna"
effort = "max"

[[subagent_model_profiles]]
name = "fast-exploration"
model = "fast-model"
effort = "low"

[[subagent_model_profiles]]
name = "deep-review"
model = "strong-review-model"
effort = "high"

Desired behavior:

  1. Agent and AgentSwarm can select an allowed profile—or an allowed model alias plus thinking effort—for each spawn.
  2. The main agent chooses automatically according to the delegated task, such as exploration, implementation, testing, debugging, or review.
  3. Users can configure a default fallback profile and optionally pin a specific profile when deterministic behavior is preferred.
  4. The approval UI and task cards show which model and thinking effort will be or were used.
  5. Resumed Subagents retain their original model and effort unless explicitly changed.
  6. Provider credentials and endpoint details remain hidden; the model only sees sanitized aliases/profiles.
  7. The main session model never needs to change as part of this routing.
Additional information

Current version: Kimi Code CLI 0.34.0.

The experimental secondary_model feature is useful, but it provides one secondary default and primarily distinguishes between primary and secondary. It does not provide task-aware selection among multiple configured model/effort profiles.

This request is related to, but different from, the static per-subagent-type bindings discussed in #1927: the desired behavior is automatic, task-aware selection at delegation time. The closed PR #1841 also explored exposing configured models to Subagents; this request additionally includes thinking-effort selection and user-defined safe profiles as a supported product feature.

In ChatGPT/Codex, I have seen different models and reasoning levels selected intelligently for different delegated tasks. That flexibility is valuable. At the same time, I find Kimi Code more convenient and productive in daily use than Codex, so I hope Kimi Code continues improving in this direction. Thanks for the great work, and keep it up!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Agent and AgentSwarm entry points and reviewing how the experimental secondary_model feature currently selects models. Compare that behavior with the requested allowlisted profiles, task-aware model and effort selection, UI visibility, and resume behavior. Done means the feature supports the stated delegation, fallback, pinning, and session-model requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.