Repository navigation
feat(providers): seed Kimi K3.1 Pro on the Moonshot API preset - #7695
Conversation
The moonshot preset (api.moonshot.ai / api.moonshot.cn) now lists kimi-k3.1-pro and kimi-k3.1-pro-highspeed next to kimi-k3 and the K2 ids, per the official platform model list. Both get the 1,048,576-token window, text + image input, and the documented always-thinking low/high/max ladder (default max, medium -> high, xhigh -> max). An explicit "none" omits reasoning_effort instead of sending an undocumented value. Sampling parameters stay stripped and reasoning content is preserved. Saved moonshot rows still carrying the previous built-in roster gain both ids at startup through the existing stale-model-roster migration, limited to the International and China endpoints; edited lists and Custom URLs are left alone. kimi-k3 keeps its max-only list, the K2 ids stay seeded, and the default stays kimi-k2.7-code (open owner decision). Prices already landed in #7657. Refs #7653
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Model seeds and registry metadata devlog/_plan/261025_moonshot_k31_seed/000_plan.md, devlog/_plan/261025_moonshot_k31_seed/010_phase1.md, src/providers/registry/model-seeds.ts, src/providers/registry/entries-extended.ts, tests/providers/provider-registry-parity.test.ts |
Adds both K3.1 Pro IDs to the Moonshot API roster with 1M context, text and image input, and a low/high/max reasoning ladder that defaults to max. The none setting omits the wire field. Registry parity tests cover model metadata and request serialization, including omitted sampling and penalty fields. |
Saved roster migration devlog/_plan/261025_moonshot_k31_seed/010_phase1.md, src/providers/stale-model-roster-migration.ts, tests/providers/model-roster-seed-repair.test.ts |
Updates an exact pre-K3.1 roster for default, International, and China destinations. The migration adds context-window and default-reasoning metadata. Tests cover idempotence and preservation of custom URLs and edited rosters. |
Provider guide updates devlog/_plan/261025_moonshot_k31_seed/010_phase1.md, docs-site/src/content/docs/guides/providers.md |
Documents model capabilities, reasoning mappings, omitted request parameters, and saved-roster migration conditions. The guide retains kimi-k2.7-code as the preset default and records K2 lifecycle dates. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature · Severity of issue fixed: Low
Possibly related PRs
- lidge-jun/opencodex#7657: Adds the same K3.1 model IDs to the Kimi Coding roster and shared metadata, so those capabilities must remain consistent with the Moonshot API registry.
Suggested labels: enhancement, documentation
Merge Risk: 
Minimal · up to 8f0dd
-
The K3.1 seed and roster changes are ready for normal checks. Video input remains outside this change’s stated scope.
Pre-merge checks: 
3 · 
2
-
Failed checks: 2 warnings Passed checks: 3 passed-
Full details: Title check
-
Explanation
The title "feat(providers): seed Kimi K3.1 Pro on the Moonshot API preset" matches the main change. The PR adds kimi-k3.1-pro and kimi-k3.1-pro-highspeed to the moonshot preset, with their context window, reasoning-effort ladder, and image input. The title is concise, uses a conventional prefix, and names the provider and model. It does not mention the stale-roster migration, but that is a supporting part of the change, so the title is still accurate.
Full details: Out of Scope Changes check
-
Explanation
The changed source paths implement
#7653:src/providers/registry/model-seeds.tsadds the K3.1 Pro seed and capability data,src/providers/stale-model-roster-migration.tsrepairs untouched saved Moonshot rosters, and the registry and roster tests cover those behaviors. The provider guide anddevlog/_plan/261025_moonshot_k31_seedfiles document the same change. No unrelated cleanup or provider behavior appears in the supplied change summary.
-
Full details: Linked Issues check
-
Explanation
Issue
#7653requires the twomoonshotK3.1 Pro IDs, a 1,048,576-token context, thelow/high/maxladder, and text, image, and video input. The changedsrc/providers/registry/model-seeds.tsentries provide the IDs, context, reasoning maps, and['text', 'image']metadata. They do not provide video input. The added parity and roster tests cover the IDs, wire mapping, metadata, and saved-roster repair, but they do not establish video support. The K2 retirement request is planning work, not a coding requirement for this assessment.Resolution
Add video capability for both K3.1 Pro IDs if the Moonshot API and the repository capability model support it. Update the registry metadata and adapter/catalog behavior as required. Add regression tests that verify video is advertised and accepted for both IDs. If the repository cannot represent or route video, document that specific limitation and update the issue requirement before merging.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 5 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
Local CI-equivalent (Linux) at 8f0dddcPASS under the temporary base-identical exception; raw failed exits are retained below. Host Environment: Selectors: ci=True, GUI=False, docs=True, structure=False. The requested direct structure check runs as well.
Test-file coverage: 2600/2600 general files, no gaps/duplicates:
Every batch uses
Combined command counts: 55875 pass / 0 fail / 173 skip. Failed command/batch exits stay failed. Failures:
Base command ledger (once per base/runtime/file or exact batch, cached across these PRs):
NOT RUN: gates/GUI lint: GUI selector false; gates/GUI build: GUI selector false; gates/Record dashboard preview source: GUI selector false; GitHub Actions checkout/setup/upload-artifact infrastructure and other platform/job legs outside this assignment; checkout, Bun role setup and dependency artifacts are reproduced locally Fresh final PR head Exact per-batch file lists, exits and logs:
UTC: 2026-10-24T21:59:29.814011+00:00 |
|
Integration evidence (owner lane M4, maintainer integration): independent gpt-6.1-sol review PASS at 8f0dddc. Exact-head PR CI run 40118974221 succeeded; Linux real-machine CI-equivalent run on this head also passed with full coverage (comment above). Not Windows-sensitive. Seeds kimi-k3.1-pro only; K2 retirement and the preset default remain an open owner decision, so #7653 stays open for that part. Static merge simulation on current dev d891cac (this Mac): dev=d891cac8ebb7c1bdf3bd4ada389084be06168de8 base=26598df2c4c07d781e344ac6119953fed77ecb27 pr_files= 8 overlap=[]; merge clean; install exit=0; gui install exit=0; tsc exit=0; tsc doctor exit=0; structure:check exit=0; privacy:scan exit=0; layout+ratchet guards exit=0 52 pass 0 fail ; Merged by the triage manager as maintainer integration (MAINTAINERS.md, dev only) with green exact-head PR CI, an independent review PASS, and the owner's approval of this bundle. |
macOS real-machine CI-equivalent verification (round 2, owner lane mac3)Result: PASS. Full macOS coverage. No INTRODUCED failures. Two control-leg tests failed once under host load; neither reproduces on this head or on dev (details below).
The shard legs cover 869 + 869 + 869 = 2607 files, which equals the control's membership. Failures and classification
NOT RUN: macOS keyring, npm-global, setup-action, and remote-helper legs (not selected for this diff). A signed or Xcode-backed widget build is not possible on this host. The first control attempt was killed by a session failure partway through and is not counted; the control above is a full rerun from a fresh worktree. No changes, pushes, approvals, or merges were made. |
Summary
The
moonshot(Kimi API) preset now seedskimi-k3.1-proandkimi-k3.1-pro-highspeed. Before this change the picker never offered them, and a routed request got no 1M window and no effort ladder (the price rows already landed in #7657, the seeds did not).Everything below comes from official Moonshot platform pages only, fetched 2026-10-25:
models.md (both ids listed as current; China: platform.kimi.com/docs/models.md lists the same ids),
pricing/chat.md ("All K3 series models support a 1,048,576-token context window"),
K3.1 Pro quickstart and
models-overview.md ("kimi-k3.1-pro and kimi-k3.1-pro-highspeed also have the same parameter constraints as kimi-k3").
low/high/max, defaultmaxmaxonlytool_choice: requiredallowed (not auto-only)noneis omitted, not sent. K3.1 Pro cannot disable thinking and documents only low/high/max, so an explicitnoneusesREASONING_EFFORT_OMIT_SENTINELand the upstream default (max) applies.modelslist, and the picker reads it, so existing installs would never see K3.1 Pro. Amoonshotrow inSTALE_MODEL_ROSTERSrefreshes only a list that is byte for byte the previous seed, and only on the International or China endpoint (or no saved URL). Edited lists and Custom URLs are left alone. The previous seed is a frozen literal, so a later K2 retirement cannot change what this matches.guides/providers.md. Translated pages don't contradict it, and no preset count changed.providers-and-adapters.md(owned by lane M5, 600/600) still reads correctly: line 87 covers the Kimi Coding seeds, and line 394 covers the generic stale-roster contract this change adds a data row to.chat-compat.mdcovers wire compatibility, not seeds. Perstructure/AGENTS.md, a reviewed doc that stays accurate is not rewritten.Owner decisions, deliberately not in this PR: the K2 series closes to new accounts on 2026-10-31 and retires by the end of December 2026 (models.md). This PR does not change the preset default (
kimi-k2.7-code,entries-extended.ts), drop the K2 ids, or add rename migrations. Possible follow-ups:kimi-k3on the API now also documents low/high/max (it is still seededmax-only), and the Kimi Coding presets still mapnoneto"none"for their thinking-only K3/K3.1 ids.Closes #7653
Verification
The regression tests failed on base
0aeaf0cb6bwith only the test edits applied:bun test tests/providers/provider-registry-parity.test.ts tests/providers/model-roster-seed-repair.test.tsgave 85 pass / 3 fail (moonshot roster/metadata parity, the saved-row K3.1 wire test, and the saved roster refresh). After the fix: 88 / 0.On merged head
8f0dddc40f(latestorigin/devmerged in):bun test(Bun 1.4.3) on provider-registry-parity, model-roster-seed-repair, usage-cost, reasoning-effort, codex-catalog, model-rename-migration: 630 pass / 0 fail, exit 0bun run typecheck: exit 0bun run privacy:scan: exit 0bun run structure:check: exit 0cd docs-site && bun install --frozen-lockfile && bun run build: exit 0 (593 pages, internal links checked)OCX_TEST_RUNNER_BUN=<bun 1.4.3> bun run test:changed: on pre-merge head889f80157b, 43,102 pass / 110 skip / 1 fail. On final head8f0dddc40f, 43,088 pass / 110 skip / 17 fail / 5 errors. Every failure was a timeout in a server or timing test (image relay, account pool and main rotation, Codex plan/config lock, launcher PATH fallback, main quota observation, test-home guard), taking 2–27s against a 5s limit while the shared host's load average was 8–11. Re-running those 8 files alone on the final head gave 446 tests, 0 fail (bun test --isolate --preload ./tests/preload.tswith the 8 files). None of them touch the moonshot seeds.8f0dddc40f: VERDICT: PASS, no findings. The reviewer also ran 663 focused tests (0 fail) and 72 extra request-body cases.NOT RUN: full
bun run test, because the host is shared (test:changedalready covers the import graph of the changed files). GUI lint/tests were not run becausegui/is unchanged.Checklist