mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-18 20:17:09 +08:00
feat: add kimi-k2.7-code and glm-5.2 models
- Add Kimi kimi-k2.7-code (default), kimi-k2.7-code-highspeed, and GLM glm-5.2 (default) - Fix 400 error when disabling thinking on kimi-k2.7-code; omit the thinking param for this series since it only accepts type=enabled - Update README, docs (zh/en/ja), install scripts, and Web console model dropdown
This commit is contained in:
@@ -47,9 +47,20 @@ class MoonshotBot(Bot):
|
||||
return model == "kimi-for-coding" or "api.kimi.com/coding" in base
|
||||
|
||||
@staticmethod
|
||||
def _model_supports_thinking(model_name: str) -> bool:
|
||||
"""Return True if the model supports the ``thinking`` request parameter."""
|
||||
def _is_builtin_reasoning_model(model_name: str) -> bool:
|
||||
"""Return True for Kimi code models with built-in reasoning.
|
||||
|
||||
These models only accept thinking type=enabled and reject disabled,
|
||||
so the thinking param must be omitted entirely.
|
||||
"""
|
||||
return model_name.lower().startswith("kimi-k2.7-code")
|
||||
|
||||
@classmethod
|
||||
def _model_supports_thinking(cls, model_name: str) -> bool:
|
||||
"""Return True if the model accepts the ``thinking`` request parameter."""
|
||||
m = model_name.lower()
|
||||
if cls._is_builtin_reasoning_model(m):
|
||||
return False
|
||||
return m.startswith("kimi-k2") or m.startswith("kimi-k1.5")
|
||||
|
||||
def _build_headers(self) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user