Skip to content

secondary_model is ignored by the interactive TUI (v1 engine) #2188

Description

@mcftira

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

  1. config.toml: [secondary_model] model = "<any configured alias>"
  2. Start the TUI, run a task that spawns an Agent subagent
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions