Repository navigation
fix(kimi): export declared effort ladder and default to Kimi Code - #8126
Conversation
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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Walkthrough
Merge Risk:
|
|
✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 656f87891a
ℹ️ 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".
…t ladders add thinking
|
Maintainer integration into
Resolves #8095. |
Summary
The Kimi Code integration writes one
[models."opencodex/<model>"]block per routed model, butbuildKimiClientConfig()never read the model's declared effort ladder. A routed model such askimi/k3.1-pro(reasoningEfforts: ["low","high","max"],defaultReasoningEffort: "low") was exported with nosupport_efforts, nodefault_effortand nothinkingcapability. Kimi Code cannot infer those from a routed name, so it offered no thinking-effort selection even though the proxy acceptsreasoning_effortfor that model. The DSH exporter already maps the same metadata.The Kimi block now carries it, following Kimi Code's documented model fields:
support_efforts: the declared ladder, limited to Kimi Code's levels (low,medium,high,xhigh,max) in that order. OpenCodex-only values such asultraare dropped, because Kimi Code fails validation on an unknown level.default_effort: only when the declared default is in that exported ladder, since Kimi requires it to be a member.capabilitiesgainsthinkingonly when a ladder is exported;image_inis unchanged.Before:
capabilities = ["image_in"], no effort fields.After:
capabilities = ["thinking", "image_in"],support_efforts = ["low", "high", "max"],default_effort = "low".Closes #8095
Verification
bun test tests/config/client-config-kimi-efforts.test.ts: 6 pass, 0 fail. With thesrc/change stashed: 3 pass, 3 fail (the ladder/default, the filtering and the TOML round-trip cases).bun test tests/config/client-config-kimi-efforts.test.ts tests/config/client-config-new-clients.test.ts tests/config/client-config-export-new-clients.test.ts tests/clients/ tests/ci-workflows/file-size-ratchet.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts: 2572 pass, 0 fail.tests/server/management-client-config-route.test.tsasserted Kimi capabilities were exactly["image_in"]for Anthropic models, which declare an effort ladder and now also getthinking. That assertion now checks thatimage_inis present (52 pass).bun run typecheck,bun run privacy:scan: pass.bun run test:changedand the fullbun run test, because the host is shared with several full-suite lanes. Left to CI. Note thattest 2/4is currently red on dev itself:tests/server/server-combo-required-tool-contract.test.tsfails from fix(responses): scope tool authority to current turn #8027 onward, unrelated to this change.Checklist
Summary by CodeRabbit