Skip to content

fix(agent-core-v2): project support_efforts and default_effort in the model catalog - #1677

Merged
sailist merged 2 commits into
MoonshotAI:mainfrom
sailist:fix/v2-model-catalog-efforts
Jul 14, 2026
Merged

fix(agent-core-v2): project support_efforts and default_effort in the model catalog#1677
sailist merged 2 commits into
MoonshotAI:mainfrom
sailist:fix/v2-model-catalog-efforts

Conversation

@sailist

@sailist sailist commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

The v2 backend's model catalog (/models) response drops support_efforts and default_effort, even though the protocol wire schema defines both fields and models declare them in config (e.g. support_efforts = ["low","high","max"], default_effort = "max"). Clients connected to the v2 backend — the web UI or any non-TUI consumer — receive undefined for the effort fields and cannot render thinking-effort selection (the web UI falls back to a plain on/off toggle). The v1 catalog projection emits both fields, so this is a v1/v2 parity gap on a surface that claims wire compatibility.

What changed

  • packages/agent-core-v2/src/app/modelCatalog/modelCatalog.ts: toProtocolModel now applies effectiveModelConfig (the v2 counterpart of v1's effectiveModelAlias, which merges config overrides) and projects support_efforts / default_effort alongside the existing fields, matching the v1 projection field-for-field.
  • packages/agent-core-v2/test/app/modelCatalog/modelCatalog.test.ts: two new projection tests — effort fields declared directly on the model config, and effective effort values when overrides replace them.
  • Changeset: @moonshot-ai/agent-core-v2 patch.

Verified: lint:domain, typecheck, and the full agent-core-v2 test suite (3337 tests) pass.

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.

… model catalog

Align toProtocolModel with the v1 projection and the protocol wire schema by applying effectiveModelConfig and emitting support_efforts / default_effort, so clients of the v2 /models endpoint see thinking-effort levels again.
@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 23a37b6

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

This PR includes changesets to release 3 packages
Name Type
@moonshot-ai/agent-core-v2 Patch
@moonshot-ai/kap-server Patch
@moonshot-ai/klient Patch

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 14, 2026

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

commit: 23a37b6

@sailist
sailist merged commit 003e583 into MoonshotAI:main Jul 14, 2026
14 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 14, 2026
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