mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-01 01:10:21 +08:00
fix: DeepSeek V4 proxy model recognition — substring match instead of exact set match for reasoning_content injection (#9015)
* fix: DeepSeek V4 proxy model recognition — substring match for reasoning_content * fix: remove deepseek-chat/reasoner exclusion per review feedback
This commit is contained in:
@@ -944,11 +944,13 @@ class ProviderOpenAIOfficial(Provider):
|
||||
"""Finally convert the payload. Such as think part conversion, tool inject."""
|
||||
model = payloads.get("model", "").lower()
|
||||
is_gemini = "gemini" in model
|
||||
deepseek_reasoning_models = {"deepseek-v4-pro", "deepseek-v4-flash"}
|
||||
_deepseek_v4_markers = ("deepseek-v4-pro", "deepseek-v4-flash", "deepseek-v4")
|
||||
is_deepseek_v4_reasoning = (
|
||||
model in deepseek_reasoning_models
|
||||
any(marker in model for marker in _deepseek_v4_markers)
|
||||
or "api.deepseek.com" in self.client.base_url.host
|
||||
)
|
||||
# deepseek-chat and deepseek-reasoner now point to V4 models (per official website)
|
||||
|
||||
# MiMo 推理模型(MiMo-V2.5-Pro / MiMo-V2.5 / MiMo-V2-Pro / MiMo-V2-Omni / MiMo-V2-Flash)
|
||||
# 要求 assistant 历史消息必须回传 reasoning_content,否则返回 400
|
||||
mimo_reasoning_models = {
|
||||
|
||||
Reference in New Issue
Block a user