Fix identifying deepseek r1 model to process its thinking tokens

This commit is contained in:
Debanjum
2025-08-26 17:14:44 -07:00
parent ff004d31ef
commit 386a17371d

View File

@@ -325,7 +325,7 @@ async def chat_completion_with_backoff(
elif (
model_name.startswith("deepseek-chat")
or model_name.startswith("deepseek-reasoner")
or "deepseek-r1" in model_name
or "deepseek-r1" in model_name.lower()
):
# Official Deepseek models and some inference APIs like vLLM return structured thinking output.
# Others like DeepInfra return it in response stream.