Skip to content

[Feat] Add Kimi K3 model to Moonshot and OpenCode Go providers#996

Merged
navedmerchant merged 3 commits into
mainfrom
feature/add-kimi-k3-3b2jsvzskmgca
Jul 24, 2026
Merged

[Feat] Add Kimi K3 model to Moonshot and OpenCode Go providers#996
navedmerchant merged 3 commits into
mainfrom
feature/add-kimi-k3-3b2jsvzskmgca

Conversation

@zoomote

@zoomote zoomote Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Naved Merchant. View the task or mention @zoomote for follow-up asks.

Related GitHub Issue

Closes: #932

Description

Adds Moonshot AI's new flagship Kimi K3 model (kimi-k3) to the Moonshot provider and the OpenCode Go provider, with parameters researched from Moonshot's platform docs (https://platform.moonshot.ai/docs) and the OpenCode Go model table (https://opencode.ai/docs/go):

  • Context window: 1,048,576 tokens (1M)
  • Max output: 131,072 tokens (default max_completion_tokens, configurable up to 1,048,576)
  • Pricing: $3.00 input (cache miss) / $0.30 cached read / $15.00 output per 1M tokens — identical on Moonshot direct and the Go plan
  • Capabilities: native visual understanding (marked supportsImages: true in moonshot.ts; false in opencode-go.ts, matching the existing Go-plan Kimi entries), automatic prompt caching, always-on reasoning with configurable reasoning_effort (low/high/max, default max), fixed temperature 1.0
  • Wire format (Go): OpenAI-compatible chat completions, so kimi-k3 is intentionally not added to OPENCODE_GO_ANTHROPIC_FORMAT_MODELS
  • Also adds kimi-k3 to LITELLM_PRESERVE_REASONING_MODEL_IDS since both registries set preserveReasoning: true, keeping that list in sync per its documented contract.

Test Procedure

  • pnpm test from the repo root: all tasks successful, 6851 tests passed (0 failed)
  • Pre-commit hooks (prettier, pnpm lint, pnpm check-types) all pass
  • Added kimi-k3 to the OpenAI-format classification list in packages/types/src/__tests__/opencode-go.test.ts and an explicit assertion in packages/types/src/__tests__/lite-llm.test.ts; existing registry invariant tests (positive maxTokens/contextWindow, supportsImages declared, reasoning-effort allow-list non-empty) cover the new entries automatically
  • Per review feedback: added an explicit getOpencodeGoModelInfo("kimi-k3") assertion block in opencode-go.test.ts covering the reasoning fields (supportsReasoningEffort, reasoningEffort: "max", preserveReasoning: true) plus context/pricing flags, and a new packages/types/src/__tests__/moonshot.test.ts suite validating the moonshotModels registry invariants, the full kimi-k3 Moonshot entry, and the provider defaults

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

N/A — non-visual model-registry metadata change; the model appears automatically in the existing provider model dropdowns.

Documentation Updates

  • No documentation updates are required.

The Moonshot docs page (docs/providers/moonshot.md) does not enumerate individual models ("Zoo Code supports all models available through the Moonshot API"), and there is no OpenCode Go provider docs page, so no docs-repo change is needed.

Additional Notes

Kimi K3 is Moonshot's 2.8-trillion-parameter flagship (Kimi Delta Attention hybrid linear attention, 16-of-896 active experts), positioned for long-horizon coding and knowledge work. Note that K3 always reasons — thinking cannot be disabled, only tuned via reasoning_effort.

@zoomote

zoomote Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

No new code issues found in the new commits. See task

Reviewed e782967

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@navedmerchant
navedmerchant marked this pull request as ready for review July 24, 2026 06:36
@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Jul 24, 2026

@edelauna edelauna left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zoomote can you address the feedback

Comment thread packages/types/src/__tests__/opencode-go.test.ts
Comment thread packages/types/src/providers/moonshot.ts
@zoomote

zoomote Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

I saw the mention, but I need your GitHub account linked to Roomote before issue and PR comments can start work here. Link it from Settings -> Linked Accounts and then mention me again.

@github-actions github-actions Bot added awaiting-author PR is waiting for the author to address requested changes and removed awaiting-review PR changes are ready and waiting for maintainer re-review labels Jul 24, 2026
@zoomote

zoomote Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Both review items are addressed in e782967:

  1. opencode-go.test.ts — added an explicit getOpencodeGoModelInfo("kimi-k3") assertion block covering supportsReasoningEffort: ["low","high","max"], reasoningEffort: "max", preserveReasoning: true, plus context window, pricing, and capability flags.
  2. moonshot.test.ts (new) — registry suite validating moonshotModels invariants (positive token limits, maxTokens ≤ contextWindow, declared capability flags, non-empty reasoning-effort allow-lists with reasoningEffort membership), the full kimi-k3 Moonshot entry, and the provider defaults.

Both review threads are resolved. Validation: pnpm test — 6851 passed, 0 failed; prettier/eslint/check-types pass via git hooks. Visual proof N/A (test-only change).

@edelauna
edelauna added this pull request to the merge queue Jul 24, 2026
@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Jul 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 24, 2026
@navedmerchant
navedmerchant added this pull request to the merge queue Jul 24, 2026
Merged via the queue into main with commit 6fec173 Jul 24, 2026
15 checks passed
@navedmerchant
navedmerchant deleted the feature/add-kimi-k3-3b2jsvzskmgca branch July 24, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR changes are ready and waiting for maintainer re-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Kimi K3 support across applicable providers

3 participants