[Bug]: moonshot k3-256k model id misses the temperature override (invalid temperature: only 1 is allowed)
Do you need to file an issue?
- [x] I have searched the existing issues and this bug is not already filed.
- [x] I believe this is a legitimate bug, not just a question or feature request.
Describe the bug
Configuring Moonshot's k3-256k model (the 256K-context variant exposed by the Kimi coding endpoint, https://api.kimi.com/coding/v1/models) fails every LLM call with HTTP 400:
invalid temperature: only 1 is allowed for this model
DeepTutor already handles this Kimi server-side temperature lock via the moonshot provider spec's model_overrides — but the patterns only match ("kimi", …) (substring) and ("=k3", …) (exact bare id). The bare id k3-256k matches neither:
_matching_overrides(moonshot_spec, "k3-256k")→ no match (not"kimi"substring, not exact"=k3")find_by_model("k3-256k")→None(no keyword hit,exact_model_ids=("k3",)doesn't include it)
So model_overrides_for("k3-256k", spec) returns {}, the caller's temperature is sent explicitly, and Kimi's gateway rejects it. This is the same failure class as #938, just for the newer model id.
Reproduction
- Settings → Catalog → add an OpenAI-compatible profile, base URL
https://api.kimi.com/coding/v1, API key from Kimi Code, model idk3-256k. - Settings → Tests → LLM (or any chat turn).
- Every call fails with
invalid temperature: only 1 is allowed for this model.
GET https://api.kimi.com/coding/v1/models confirms the available ids:
kimi-for-coding context_length 262144 (K2.7)
kimi-for-coding-highspeed context_length 262144
k3 context_length 1048576
k3-256k context_length 262144
Expected behavior
k3-256k should get the same {"temperature": None} override as k3, so the parameter is dropped and the server applies its fixed value.
Suggested fix
In deeptutor/services/provider_registry.py, moonshot spec:
model_overrides=(
("kimi", {"temperature": None}),
("=k3", {"temperature": None}),
("=k3-256k", {"temperature": None}), # add
),
exact_model_ids=("k3", "k3-256k"), # extend
Verified working in our deployment (container patch): after adding both entries, LLM test and full RAG chat turns succeed against k3-256k.
Environment
DeepTutor v1.6.0–v1.6.4 (Docker, ghcr.io/hkuds/deeptutor:latest), also present on current main branch.
Thanks for your comments!Will be fixed in the next version~
Fixed on dev in 26500eeb. Rather than adding k3-256k as a third literal, the Kimi k3 family is now named once — k3-1m and k3-turbo are covered automatically, while sk3, k30 and k3x still are not.