🤖 feat: add native Kimi K3 support via a new Moonshot AI provider#3737
🤖 feat: add native Kimi K3 support via a new Moonshot AI provider#3737ibetitsmike wants to merge 4 commits into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd15daa74b
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
9c234f9 to
eef38f9
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Adds Kimi K3 as a first-class built-in model backed by a new
moonshotaidirect provider (official@ai-sdk/moonshotaipackage), with aliases, token/cost metadata, a fixed thinking policy, and reasoning options matching what the model actually accepts. OpenRouter routing for Moonshot models keeps working as a gateway route.Background
Kimi K3 is Moonshot AI's flagship open-weight reasoning model (released July 16, 2026). The first iteration of this PR registered it as an OpenRouter gateway model; per review direction it now uses the AI SDK's official Moonshot provider directly (
MOONSHOT_API_KEY,api.moonshot.ai), which types K3'sreasoningEffortas the literal"max".Implementation
moonshotaiprovider: registered inPROVIDER_DEFINITIONS(direct,createMoonshotAI), providers config schema,MOONSHOT_API_KEYenv wiring, Settings key URL, provider icon, and OpenRouterroutessoopenrouter:moonshotai/...still canonicalizes and routes correctly.KIMI_K3registry entry is nowmoonshotai:kimi-k3(aliaseskimi,k3,kimi-k3); tokenizer falls back tomoonshotai/kimi-k2until K3 lands in ai-tokenizer.moonshotai/kimi-k3: 1M context / 128K output, $3/M in, $15/M out, $0.30/M cache read, vision + reasoning + function calling.isKimiK3Model()predicate; fixed["max"]thinking policy;buildProviderOptionssends{ moonshotai: { reasoningEffort: "max" } }for direct requests and the explicit OpenRoutereffort: "max"payload when routed through OpenRouter (Codex round-1 fix;enabled: truealone falls back to OpenRouter's default medium effort).docs/config/models.mdx,docs/config/providers.mdx, and built-in skill content.Validation
make static-checkgreen.createMoonshotAIinstantiateskimi-k3(spec v4) under ourai@7stack.Risks
Low-to-moderate. Registering
moonshotaias a direct provider changes canonicalization ofopenrouter:moonshotai/*strings (they now normalize to the direct provider for metadata, and stay on OpenRouter only via explicit gateway routing). Covered by routing/normalization tests; the non-K3 OpenRouter payload path is unchanged.Generated with
mux• Model:anthropic:claude-fable-5• Thinking:xhigh• Cost:$19.36