Fix: Improve test_openai_function_calling unit test and fix reasoning_parser.py think_start_token logic (#8316)

Co-authored-by: Chang Su <chang.s.su@oracle.com>
This commit is contained in:
Binyao Jiang
2025-07-27 13:12:59 -07:00
committed by GitHub
parent b58c3c285e
commit e983d66680
3 changed files with 167 additions and 6 deletions

View File

@@ -493,9 +493,6 @@ class OpenAIServingChat(OpenAIServingBase):
)
yield f"data: {chunk.model_dump_json()}\n\n"
if not delta:
continue
# Handle tool calls
if request.tool_choice != "none" and request.tools:
async for (

View File

@@ -32,7 +32,7 @@ class BaseReasoningFormatDetector:
One-time parsing: Detects and parses reasoning sections in the provided text.
Returns both reasoning content and normal text separately.
"""
in_reasoning = self._in_reasoning or text.startswith(self.think_start_token)
in_reasoning = self._in_reasoning or self.think_start_token in text
if not in_reasoning:
return StreamingParseResult(normal_text=text)