Files
DeepTutor/deeptutor/services
Bingxi Zhao (Frank) f2fac28d7b fix(llm): resolve model-intrinsic overrides from the model, not the route
Kimi models lock temperature server-side and reject any explicit value with
HTTP 400 "invalid temperature: only 1 is allowed for this model". The
moonshot spec has dropped the parameter for them since before v1.5.5, but
the lookup ran over the *configured binding's* spec, so it only fired for
someone who had picked binding="moonshot". #938 picked binding="openai" and
pointed it at Moonshot — what most people do with an OpenAI-compatible
endpoint — and kept getting the 400 two months after the fix landed.

The route is not what enforces the limit, so the route should not be what
decides. `model_overrides_for` states that once: the configured spec wins
when it says something about this model, otherwise the model's own vendor
spec answers. `find_by_model` already skipped gateway and local entries, so
it lands on the vendor whose API enforces the limit; it was simply never
consulted on this path.

This generalises past kimi — every model-intrinsic override was being lost
behind a generic gateway binding, and a spec-less config got none at all.

The override had no test, which is how it stayed half-wired. The added ones
are written as the reporter's scenario, and pin the two things that must not
break: an explicit binding still wins, and the tunable moonshot-v1-* series
(no "kimi" in the name) keeps the caller's temperature.
2026-08-21 16:22:58 +08:00
..
2026-08-02 13:23:45 +08:00
2026-06-17 00:56:27 +08:00
2026-08-17 11:22:26 +08:00
2026-06-11 20:03:34 +08:00
2026-08-19 17:34:52 +08:00
2026-08-20 14:15:53 +08:00
2026-08-19 17:34:52 +08:00
2026-06-18 00:22:48 +08:00
2026-06-11 20:03:34 +08:00
2026-06-17 00:56:27 +08:00
2026-06-18 00:22:48 +08:00