First off, thank you for landing #2064 - secondary_model is exactly the primitive I needed.
What happens
[secondary_model] works under kimi web (with KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=1) and kimi -p (with KIMI_CODE_EXPERIMENTAL_FLAG=1), but the interactive TUI ignores it: subagents always inherit the main model there.
Why
The TUI boots agent-core (v1) via the SDK harness (apps/kimi-code/src/main.ts), and v1 hardcodes inheritance in packages/agent-core/src/session/subagent-host.ts ("A subagent always inherits the parent agent's model"). The v2 binding logic in agent-core-v2/src/session/subagent/configSection.ts never runs in the TUI. So this is engine routing, not a small gate to flip.
Repro
config.toml: [secondary_model] model = "<any configured alias>"
- Start the TUI, run a task that spawns an Agent subagent
- The subagent runs on the main model instead of the configured secondary
Use case
I run a local DGX Spark serving a 35B model behind an OpenAI-compatible router. secondary_model lets the main model handle planning and verification while the local model does the bulk reading for free. It works great in kimi -p; I would love the same split in interactive sessions.
Related
Question for maintainers
Is the plan to wait for TUI-on-v2 (#1543), or would you accept a v1-side fix in the meantime? Happy to contribute whatever fits the roadmap best: a v1 startup warning when [secondary_model] is set but ignored, a port behind a flag, or review/testing on #1996.
First off, thank you for landing #2064 -
secondary_modelis exactly the primitive I needed.What happens
[secondary_model]works underkimi web(withKIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=1) andkimi -p(withKIMI_CODE_EXPERIMENTAL_FLAG=1), but the interactive TUI ignores it: subagents always inherit the main model there.Why
The TUI boots agent-core (v1) via the SDK harness (
apps/kimi-code/src/main.ts), and v1 hardcodes inheritance inpackages/agent-core/src/session/subagent-host.ts("A subagent always inherits the parent agent's model"). The v2 binding logic inagent-core-v2/src/session/subagent/configSection.tsnever runs in the TUI. So this is engine routing, not a small gate to flip.Repro
config.toml:[secondary_model] model = "<any configured alias>"Use case
I run a local DGX Spark serving a 35B model behind an OpenAI-compatible router.
secondary_modellets the main model handle planning and verification while the local model does the bulk reading for free. It works great inkimi -p; I would love the same split in interactive sessions.Related
Question for maintainers
Is the plan to wait for TUI-on-v2 (#1543), or would you accept a v1-side fix in the meantime? Happy to contribute whatever fits the roadmap best: a v1 startup warning when
[secondary_model]is set but ignored, a port behind a flag, or review/testing on #1996.