Skip to content

feat(secondary-model): drop the experimental flag from the subagent model pool - #3634

Merged
7Sageer merged 2 commits into
mainfrom
feat/secondary-model-always-on
Sep 8, 2026
Merged

feat(secondary-model): drop the experimental flag from the subagent model pool#3634
7Sageer merged 2 commits into
mainfrom
feat/secondary-model-always-on

Conversation

@7Sageer

@7Sageer 7Sageer commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

None — follow-up to #3334, which flipped the pool on by default.

Problem

The subagent model pool ([secondary_model]) has been enabled by default in every launch mode since #3334, but the secondary-model experimental flag still gates it: the flag keeps showing up in /experiments, and KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=0 / [experimental] secondary-model = false can still turn the pool off. That keeps a second, rarely exercised behavior path alive (subagents inherit the caller's model, session startup skips pool validation) that config and tool code must keep branching on.

What changed

Graduates the pool out of experimental entirely, following the file-history graduation in #3525:

  • Removed the secondary-model flag definition and its KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL env var; the pool is now always on. A leftover [experimental] secondary-model = false in user config is ignored (the section is an open record), so no migration is needed.
  • resolveSubagentBinding / exposesSubagentModelChoice / assertValidSubagentModelConfig / buildSubagentModelDescriptions dropped their flags parameter; SessionSubagentService, TowerSpawnTool, and the models-validation service no longer inject IFlagService (the Agent/AgentSwarm tools keep it for the fork flag).
  • The /secondary-model slash command no longer carries experimentalFlag, so it is always visible.
  • Tests: removed the two flag-disabled behavior tests, adapted flag stubs.
  • Docs (en + zh): dropped the env var from env-vars, rewrote the pool opt-out paragraph in config-files, removed the "hidden when disabled" note from slash-commands, synced the update-config builtin skill.
  • Web bundle: re-synced apps/kimi-code/dist-web from code-app with the settings-dialog gate removed (source change: kimi-code-app PR linked below); previously the subagents settings section keyed off experimental_flags["secondary-model"] from /api/v1/meta and would have disappeared with the flag gone.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6f491f6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

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

@7Hanrui

7Hanrui commented Sep 8, 2026

Copy link
Copy Markdown

@codex review

@pkg-pr-new

pkg-pr-new Bot commented Sep 8, 2026

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

commit: 6f491f6

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b90cf0799

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

return { model: own.modelAlias, thinking: own.thinkingLevel, modelSource: 'primary_override' };
}
const pool = enabled ? resolveSubagentModelPool(config) : undefined;
const pool = resolveSubagentModelPool(config);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ship the web bundle without the removed flag gate

When users open the bundled browser UI with the normal default configuration, this now always resolves the secondary-model pool, but apps/kimi-code/dist-web/assets/index-CiHMlsuo.js still renders its secondary-model settings only when experimentalFlags["secondary-model"] or the legacy config override is true. Because removing the flag registration also removes that key from /api/v1/meta, the settings section disappears for most web users even though the backend feature is active; sync and commit the code-app bundle with this gate removed.

AGENTS.md reference: AGENTS.md:L18-L18

Useful? React with 👍 / 👎.

@7Hanrui

7Hanrui commented Sep 8, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 3483b2f8f6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7Sageer
7Sageer force-pushed the feat/secondary-model-always-on branch from 3483b2f to 6f491f6 Compare September 8, 2026 03:31
@7Hanrui

7Hanrui commented Sep 8, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 6f491f650c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7Sageer
7Sageer merged commit e831fd1 into main Sep 8, 2026
15 checks passed
@7Sageer
7Sageer deleted the feat/secondary-model-always-on branch September 8, 2026 03:37
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.

2 participants