Skip to content

docs: clarify secondary model default binding and override precedence - #2553

Merged
7Sageer merged 1 commit into
mainfrom
docs/secondary-model-clarify
Aug 3, 2026
Merged

docs: clarify secondary model default binding and override precedence#2553
7Sageer merged 1 commit into
mainfrom
docs/secondary-model-clarify

Conversation

@7Sageer

@7Sageer 7Sageer commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

None — this is a documentation clarification; the problem is explained below.

Problem

The [secondary_model] documentation did not make clear how a spawned subagent's model is actually chosen. A reader configuring a secondary model could not tell:

  • whether spawned subagents are forced onto the secondary model or merely default to it (it is a default binding, not a forced one);
  • what overrides the default, and in what order — an explicit tool-call model wins over the agent profile's model_preference, which in turn wins over the configured secondary model;
  • that the Agent / AgentSwarm tool's model parameter accepts only the symbolic values "primary" / "secondary", not a concrete model alias;
  • that "primary" means the model the main agent is currently running — not necessarily default_model (e.g. after a mid-session /model switch).

What changed

Documentation only, both locales kept in sync (docs/en + docs/zh), verified against the implementation in packages/agent-core / packages/agent-core-v2:

  • configuration/config-files.md: rewrote the secondary_model section opening — states the default-vs-forced semantics, the full override precedence chain, the symbolic model values, and what "primary" resolves to; also fixes the model field wording (model id → alias of a configured [models] entry) and unifies subagent terminology.
  • customization/agents.md: the model_preference row now notes that an explicit tool-call model accepts only "primary" / "secondary", links to the [secondary_model] config section, and describes primary as the caller's currently running model.
  • reference/slash-commands.md + configuration/env-vars.md: unify the secondary-model terminology and the [models] alias wording.

Verified with npm run build in docs/ (VitePress build passes).

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • Docs-only change — no feature tests apply; the docs build passes.
  • Ran gen-changesets skill, or this PR needs no changeset. (No changeset: docs-only change, per the skill's docs-only rule.)
  • Ran gen-docs skill, or this PR needs no doc update. (This PR is itself the doc update.)

The secondary_model section did not state whether spawned subagents are
forced onto the secondary model or only default to it, nor the full
override precedence. Make the semantics explicit in both locales:

- spawning resolves the model in order: explicit tool-call model ->
  profile model_preference -> configured secondary model (default)
- the tool's model parameter accepts only "primary" / "secondary"
- "primary" means the model the main agent is currently running, not
  necessarily default_model
- the user has no per-spawn switch; overriding is the main agent's
  decision or a profile setting

Also unify secondary-model terminology and the [models] alias wording
across the config-files, agents, slash-commands, and env-vars pages.
@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3a7c927

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@3a7c927
npx https://pkg.pr.new/@moonshot-ai/kimi-code@3a7c927

commit: 3a7c927

@7Sageer
7Sageer merged commit 29c9e2a into main Aug 3, 2026
15 checks passed
@7Sageer
7Sageer deleted the docs/secondary-model-clarify branch August 3, 2026 07:42
daofazhiran pushed a commit to daofazhiran/kimi-code that referenced this pull request Aug 4, 2026
…MoonshotAI#2553)

The secondary_model section did not state whether spawned subagents are
forced onto the secondary model or only default to it, nor the full
override precedence. Make the semantics explicit in both locales:

- spawning resolves the model in order: explicit tool-call model ->
  profile model_preference -> configured secondary model (default)
- the tool's model parameter accepts only "primary" / "secondary"
- "primary" means the model the main agent is currently running, not
  necessarily default_model
- the user has no per-spawn switch; overriding is the main agent's
  decision or a profile setting

Also unify secondary-model terminology and the [models] alias wording
across the config-files, agents, slash-commands, and env-vars pages.
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Aug 15, 2026
…MoonshotAI#2553)

The secondary_model section did not state whether spawned subagents are
forced onto the secondary model or only default to it, nor the full
override precedence. Make the semantics explicit in both locales:

- spawning resolves the model in order: explicit tool-call model ->
  profile model_preference -> configured secondary model (default)
- the tool's model parameter accepts only "primary" / "secondary"
- "primary" means the model the main agent is currently running, not
  necessarily default_model
- the user has no per-spawn switch; overriding is the main agent's
  decision or a profile setting

Also unify secondary-model terminology and the [models] alias wording
across the config-files, agents, slash-commands, and env-vars pages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant