fix(llm): treat deepseek-flash as a thinking model (#1389)

This commit is contained in:
olivergpt
2026-09-24 11:45:29 -07:00
committed by GitHub
parent 35543d0248
commit ecd3404213
2 changed files with 24 additions and 1 deletions
+6 -1
View File
@@ -94,6 +94,7 @@ _DEFAULT = ModelCapabilities(
_BY_ID: dict[str, ModelCapabilities] = {
"deepseek-chat": _DEEPSEEK_CHAT,
"deepseek-reasoner": _DEEPSEEK_THINKING,
"deepseek-flash": _DEEPSEEK_THINKING,
"deepseek-v4-flash": _DEEPSEEK_THINKING,
"deepseek-v4-pro": _DEEPSEEK_THINKING,
# MiniMax — full official model lineup per
@@ -108,10 +109,14 @@ _BY_ID: dict[str, ModelCapabilities] = {
}
# Forward-compat patterns. New ``deepseek-v5-*`` / ``deepseek-reasoner-*``
# or ``MiniMax-M3*`` variants inherit the thinking-mode quirks automatically.
# / ``deepseek-flash-*`` or ``MiniMax-M3*`` variants inherit the thinking-mode
# quirks automatically. ``deepseek-flash`` is the unversioned alias the model
# picker offers for V4.1 Flash; it serves thinking mode and so rejects
# ``tool_choice`` exactly like the versioned ``deepseek-v4-flash`` ID does.
_BY_PATTERN: list[tuple[re.Pattern[str], ModelCapabilities]] = [
(re.compile(r"^deepseek-v\d"), _DEEPSEEK_THINKING),
(re.compile(r"^deepseek-reasoner"), _DEEPSEEK_THINKING),
(re.compile(r"^deepseek-flash"), _DEEPSEEK_THINKING),
(re.compile(r"^MiniMax-M\d"), _MINIMAX_THINKING),
]