fix(config): recognize provider model capabilities#346
Conversation
🦋 Changeset detectedLatest commit: 2cc09f1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
a535748 to
2cc09f1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cc09f13a8
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const KIMI_K2_5_CAPABILITY: ModelCapability = Object.freeze({ | ||
| image_in: true, | ||
| video_in: false, |
There was a problem hiding this comment.
Enable video input for Kimi K2.5
For kimi-k2.5, leaving video_in false under-detects a supported modality: the Kimi K2.5 API accepts video input, but ToolManager.initializeBuiltinTools only exposes ReadMediaFile for video when modelCapabilities.video_in is true. In sessions using the catalogued kimi-k2.5 model, users will be told the current model does not support video and cannot attach videos even though the provider can send/upload them; this should be true like K2.6.
Useful? React with 👍 / 👎.
| image_in: false, | ||
| video_in: false, | ||
| audio_in: false, | ||
| thinking: false, |
There was a problem hiding this comment.
Mark MiniMax M2.7 as thinking-capable
This shared capability object makes MiniMax-M2.7 and MiniMax-M2.7-highspeed report thinking: false, even though the Anthropic-compatible M2.7 API emits thinking blocks as part of its interleaved-thinking tool flow. Any caller relying on getCapability() will under-report those models and can hide or avoid thinking support for a model whose tool-loop responses include reasoning blocks; split M2.7 out or mark the M2.x entries that support interleaved thinking as thinking-capable.
Useful? React with 👍 / 👎.
Related Issue
Resolve #250
Problem
Environment-configured OpenAI and Anthropic models could inherit Kimi-only default capabilities. Several current provider models were also missing from static capability detection, so media, thinking, and tool support could be under-detected.
What changed
KIMI_MODEL_CAPABILITIESto the Kimi provider.video_inwhile the Anthropic adapter does not sendvideo_url.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Verification
corepack pnpm --filter @moonshot-ai/agent-core exec vitest run test/config/env-model.test.tscorepack pnpm --filter @moonshot-ai/kosong exec vitest run test/capability-providers.test.tscorepack pnpm --filter @moonshot-ai/agent-core exec tsc -p tsconfig.json --noEmitcorepack pnpm --filter @moonshot-ai/kosong exec tsc -p tsconfig.json --noEmitcorepack pnpm lint -- packages/agent-core/src/config/env-model.ts packages/agent-core/test/config/env-model.test.tscorepack pnpm lint -- packages/kosong/src/providers/capability-registry.ts packages/kosong/src/providers/kimi.ts packages/kosong/test/capability-providers.test.tscorepack pnpm -C docs run buildgit diff --check