[fix] fix output tokens count in streaming completion api (#3507)

This commit is contained in:
李泳桦
2025-08-21 18:19:13 +08:00
committed by GitHub
parent e4f0b755b4
commit 8bea4b1e25

View File

@@ -407,7 +407,6 @@ class OpenAIServingCompletion:
delta_message.tool_calls = delta_message_output.tool_calls
choices.append(delta_message)
output_tokens[idx] += 1
if res["finished"]:
choices[-1].finish_reason = self.calc_finish_reason(