Skip to content

fix(config): recognize provider model capabilities#346

Open
LiPu-jpg wants to merge 5 commits into
MoonshotAI:mainfrom
LiPu-jpg:fix/env-model-provider-capabilities
Open

fix(config): recognize provider model capabilities#346
LiPu-jpg wants to merge 5 commits into
MoonshotAI:mainfrom
LiPu-jpg:fix/env-model-provider-capabilities

Conversation

@LiPu-jpg
Copy link
Copy Markdown

@LiPu-jpg LiPu-jpg commented Jun 2, 2026

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

  • Limit default KIMI_MODEL_CAPABILITIES to the Kimi provider.
  • Add capability recognition for current MiMo, MiniMax, DeepSeek, and Kimi Open Platform models.
  • Keep provider-path limitations conservative, such as not enabling MiniMax-M3 video_in while the Anthropic adapter does not send video_url.
  • Add regression tests, docs updates, and changesets.

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.

Verification

  • corepack pnpm --filter @moonshot-ai/agent-core exec vitest run test/config/env-model.test.ts
  • corepack pnpm --filter @moonshot-ai/kosong exec vitest run test/capability-providers.test.ts
  • corepack pnpm --filter @moonshot-ai/agent-core exec tsc -p tsconfig.json --noEmit
  • corepack pnpm --filter @moonshot-ai/kosong exec tsc -p tsconfig.json --noEmit
  • corepack pnpm lint -- packages/agent-core/src/config/env-model.ts packages/agent-core/test/config/env-model.test.ts
  • corepack pnpm lint -- packages/kosong/src/providers/capability-registry.ts packages/kosong/src/providers/kimi.ts packages/kosong/test/capability-providers.test.ts
  • corepack pnpm -C docs run build
  • git diff --check

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 2, 2026

🦋 Changeset detected

Latest commit: a535748

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 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

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.

KIMI_MODEL_* 环境变量路径会给 OpenAI/Anthropic 模型默认声明 Kimi 能力

1 participant