Skip to content

fix: mark Kimi K3 temperature as unsupported - #3331

Merged
rekram1-node merged 2 commits into
devfrom
fix/kimi-k3-temperature
Jul 18, 2026
Merged

rekram1-node merged 2 commits into
devfrom
fix/kimi-k3-temperature

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • Set temperature = false on the Kimi K3 base model (models/moonshotai/kimi-k3.toml)
  • Drop the now-redundant OpenRouter override

Moonshot locks K3 sampling server-side (temperature fixed at 1.0). Passing any other value returns HTTP 400; docs say to omit the field. The base model incorrectly advertised temperature = true, so every provider inheriting it told clients to send temperature.

Why not provider-local overrides

#3328 only patched providers/opencode-go/models/kimi-k3.toml. That papers over OpenCode Go while leaving moonshotai, llmgateway, vercel, etc. wrong. Same pattern as kimi-k2.5 / kimi-k2.7-code base models.

Evidence

Validation

  • bun validate
  • Resolved catalog: temperature: false for moonshotai, opencode-go, and openrouter kimi-k3

Moonshot fixes K3 sampling server-side (temperature locked at 1.0);
passing any other value returns HTTP 400. Correct the base model so
all providers inherit temperature=false instead of per-provider overrides.
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [low] [possible mistake] packages/core/src/sync/providers/vercel.ts:137 (interacts with models/moonshotai/kimi-k3.toml:8) - Check: Vercel sync hardcodes temperature = true for every language model. Why: After this PR flips the K3 base to temperature = false, the Vercel sync's computed desired model for moonshotai/kimi-k3 carries temperature = true. sameVercelModel (vercel.ts:222) omits temperature from its comparison, so the file won't rewrite today, but any future Vercel sync that rewrites kimi-k3 for another reason (a pricing/limit change) will write temperature = true, reverting this fix for Vercel and contradicting the base model the PR body claims to fix. Action: Verify whether Vercel's K3 route actually honors a temperature parameter (Moonshot locks it server-side and rejects non-1.0 values with HTTP 400 per the cited docs). If it does not, reconcile vercel.ts:137 so the sync does not re-assert temperature = true for K3.
  • [low] [possible mistake] packages/core/src/sync/providers/empiriolabs.ts:277 (interacts with models/moonshotai/kimi-k3.toml:8) - Check: Empiriolabs sync sets temperature = true when its API lists temperature in supported_parameters. Why: Empiriolabs uses the default sameModel (full stable() comparison), so if its API reports temperature for kimi-k3, the next daily sync will immediately write temperature = true to providers/empiriolabs/models/kimi-k3.toml, reverting this fix. The current file has no temperature override, which is consistent with either an API that lists temperature or one that does not, so the reversion risk cannot be ruled out from the file alone. Action: Verify Empiriolabs' supported_parameters for kimi-k3. If temperature is listed, confirm whether the route actually honors it and address the sync if not.

Vercel has no sampling-parameter signal. Hardcoding temperature=true
would reassert true on factored models like kimi-k3 whenever sync
rewrites the file, undoing base_model temperature=false. Inherit from
existing/base instead.
@rekram1-node

Copy link
Copy Markdown
Collaborator Author

Addressed the Vercel sync concern:

  • buildVercelModel no longer hardcodes temperature: true
  • Uses existing?.temperature so factored models inherit base metadata (same pattern as digitalocean/deepinfra/crossmodel)
  • Added regression test: Vercel moonshotai/kimi-k3 does not write a temperature override

@rekram1-node
rekram1-node merged commit c6b8283 into dev Jul 18, 2026
2 checks passed
@rekram1-node
rekram1-node deleted the fix/kimi-k3-temperature branch July 18, 2026 16:52
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant