Commit f386eb3
bcode
fix(provider): prefer per-model temperature over agent override
`ProviderTransform.temperature(model)` encodes per-model-family temperature
values that the model's provider requires (e.g. Moonshot's kimi-k2.* returns
HTTP 400 "invalid temperature: only 1 is allowed for this model" if any
other value is sent). The session/llm.ts call site consulted it in the wrong
order:
input.agent.temperature ?? ProviderTransform.temperature(input.model)
so the built-in title agent's hard-coded `temperature: 0.5` (agent.ts:271)
won over the kimi-required 1.0, and Moonshot rejected the request.
Swap the operands. The transform value, when present, is the model-aware
answer and should beat a generic agent default. For models that aren't in
the transform map, the function returns `undefined` and the agent's
preference still applies through `??` fallthrough.
Affects: kimi-k2.* (incl. k2.6, thinking, k2-5), gemini, glm-4.6/4.7,
minimax-m2, qwen — anywhere the transform has an entry.1 parent de1d917 commit f386eb3
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
0 commit comments