[Bugfix] UnboundLocalError when GptOss reasoning specified (#23054)

Signed-off-by: Federico <65908512+coval3nte@users.noreply.github.com>
This commit is contained in:
Federico
2025-08-27 02:29:52 +02:00
committed by GitHub
parent 714872f1a9
commit 585e0bde36

View File

@ -887,7 +887,8 @@ class OpenAIServingChat(OpenAIServing):
delta_message = DeltaMessage(content=delta_text)
# update the previous values for the next iteration
if tool_choice_auto or self.reasoning_parser:
if ((tool_choice_auto or self.reasoning_parser)
and not self.use_harmony):
assert previous_texts is not None
assert all_previous_token_ids is not None
previous_texts[i] = current_text