Repository navigation
fix(runtime): honor Kimi K3 none effort - #6183
Conversation
Generated-by: OpenAI Codex
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
First review of 4e46ba3e (+60/-20, 3 files). No P0–P2 findings.
Root cause this fixes. The Host test prompt suggestions ask Kimi K3 for its lowest effort… started failing intermittently on many unrelated PRs from about 2026-10-20 01:55Z, with thinking left undefined. The test read the process-wide model metadata, and refreshed models.dev data now declares none for kimi-coding-plan/k3. Once none is present, thinkingVariantsForModel includes off, so leastReasoningThinkingLevel picks off. Before this PR the Kimi builder dropped off to {}, so K3 was left on its default reasoning. That is both why the test went red and a real behavior gap: with current upstream metadata, "off" and prompt suggestions did not actually disable K3 thinking.
Change.
model-factory.ts(kimi-coding-plancase):offnow sends an explicit disabled wire when the metadata declaresnone—thinking: { type: 'disabled' }on Anthropic Messages,reasoningEffort: 'none'on the OpenAI-compatible route. Withoutnone(bundled catalog),offstill returns{}as before, andon/unset are unchanged.- The Host test now pins the refreshed shape with
installRefreshedModelMetadataand resets it int.after, matching the pattern inmodel-metadata-refresh.test.ts. So it no longer depends on what other code installed process-wide. It asserts disabled thinking, noeffort, and the 128-token no-thinking budget. - A new runtime unit test covers both wires and
leastReasoningThinkingLevel === 'off'under the refreshed shape. The existing bundled-catalog assertion (off→{}) is kept.
P3 (optional): the Host-level prompt-suggestion path for a catalog without none (previously asserted as adaptive thinking with effort: low, max_tokens 1024) no longer has a composition-level test; only the unit-level off → {} assertion remains. A second pinned case without none would keep that path covered.
CI. The first test run (39365300767) failed in "Run affected standard workspace tests" on Maka Pi TUI runner › serializes an idle /session switch behind a retraction started during its activity wait. This PR does not touch the TUI, so that looks like an unrelated timing-sensitive test; I re-ran the failed job. The Runtime Host step did not complete in that run, so the pinned Kimi case still needs to pass on this head before merge.
Generated-by: OpenAI Codex
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
Incremental review of 4e46ba3e..b3c77402 (one test-only commit, no rebase). No P0–P2 findings; the earlier P3 is fixed.
The Host prompt-suggestion test is now a two-scenario table, each pinning its own refreshed kimi-coding-plan/k3 catalog shape and resetting it in t.after:
- with
nonedeclared:thinking: { type: 'disabled' }, noeffortanywhere in the body,max_tokens128; - without
none:thinking: { type: 'adaptive' },"effort":"low",max_tokens1024 — the behavior the original test asserted, so the no-nonepath is covered end to end again.
Most of the diff is re-indentation inside the loop; with whitespace ignored, only the scenario table and the parameterized assertions change. Nit (no action needed): the effort branch matches the literal "low" rather than scenario.effort, which is fine while there is only one such scenario.
Production code is unchanged from the previous review. CI test on this head was still pending when I checked.
Summary
Kimi Code's refreshed models.dev metadata now declares
nonefor K3. Maka resolves that asoff, but the Kimi Coding Plan request builder previously droppedoff, leaving K3 at its default reasoning level. When the metadata declaresnone, send Kimi's explicit disabled-thinking wire for Anthropic Messages andreasoning_effort: nonefor OpenAI Chat. Keep the current behavior for catalog entries that do not declarenone. The wire mapping follows the Kimi Code model configuration.Verification
npm run build:testnode --test packages/runtime/dist/__tests__/model-factory-thinking.test.js— 55 passednode --test packages/runtime-host/dist/__tests__/execution-model-composition.test.js— 43 passed, including prompt-suggestion cases with and withoutnonemetadatagit diff --checkAI use
Tool(s) and scope: OpenAI Codex implemented the runtime mapping and tests.
Checklist
Does this PR entail a change in behavior?
none, the least-reasoning choice now disables thinking.