Feature/online/vs think 20250813 (#3451)

* add stream

* fix ernie_vl_reasoning_parsers

* fix bug

* fix finish reason
This commit is contained in:
luukunn
2025-08-18 14:49:40 +08:00
committed by GitHub
parent edf1ca07af
commit 5c3c1b68a6

View File

@@ -443,7 +443,7 @@ class OpenAIServingChat:
max_tokens = request.max_completion_tokens or request.max_tokens
if has_no_token_limit or previous_num_tokens != max_tokens:
choice.finish_reason = "stop"
if self.engine_client.reasoning_parser == "ernie_x1" and output.get("finish_reason", "") == "tool_calls":
if output.get("tool_call"):
choice.finish_reason = "tool_calls"
else:
choice.finish_reason = "length"