Skip to content

feat(agent-core-v2): advertise model capabilities in the subagent model picker - #2591

Merged
7Sageer merged 3 commits into
mainfrom
feat/subagent-model-capabilities
Aug 4, 2026
Merged

feat(agent-core-v2): advertise model capabilities in the subagent model picker#2591
7Sageer merged 3 commits into
mainfrom
feat/subagent-model-capabilities

Conversation

@7Sageer

@7Sageer 7Sageer commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

With the secondary-model experiment enabled, the subagent collaboration tools (Agent / AgentSwarm) advertise the routable models in their model parameter descriptions — but only as bare model ids. The parent agent has no way to tell whether the secondary model supports images or thinking, so it can delegate a multimodal task to a text-only model; the engine then silently degrades (media tools unregistered, images replaced with placeholder text) without the parent ever knowing.

What changed

Each advertised model line now carries a capabilities: ... suffix derived from the model catalog's resolved capability flags (image_in, video_in, audio_in, thinking, tool_use, dynamically_loaded_tools), e.g.:

- secondary: example-provider/example-model (default) — the configured secondary model; prefer it for routine subagent tasks; capabilities: image_in, thinking, tool_use
  • The lookup follows the same binding rule as spawn time: a secondary model configured via a patch recipe resolves capabilities from the derived entry the subagent would actually run on.
  • Fail-soft: a model that fails catalog resolution (dangling recipe pointer, unconfigured entry) silently omits the suffix instead of breaking tool-schema generation; spawn still surfaces the real error.
  • Numeric limits (max_context_tokens) are deliberately excluded — only the boolean ability array is advertised.
  • No changeset: the advertised lines only exist while the secondary-model experiment flag (default off) is enabled, so nothing changes on shipped surfaces.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • 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 Aug 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6b9079b

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 4, 2026

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

commit: b3c3890

@7Sageer
7Sageer merged commit af43c52 into main Aug 4, 2026
14 checks passed
@7Sageer
7Sageer deleted the feat/subagent-model-capabilities branch August 4, 2026 07:57
mbuckaway pushed a commit to mbuckaway/kimi-code that referenced this pull request Aug 4, 2026
…el picker (MoonshotAI#2591)

* feat(agent-core-v2): advertise model capabilities in the subagent model picker

* chore(agent-core-v2): follow header-only comment convention

* docs(agent-core-v2): note the model catalog collaborator in the AgentSwarmTool header
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