fix: keep batch-path function_call_output.output as string per OpenAI spec

The streaming path emits output as content-part arrays for Open WebUI
compatibility, but the batch (non-streaming) Responses API path must
return output as a plain string per the OpenAI Responses API spec.
Reverts the _extract_output_items change from the cherry-picked commits
while preserving the streaming path's array format.
This commit is contained in:
Teknium 2026-04-14 20:47:06 -07:00 committed by Teknium
parent 302554b158
commit cf1d718823
2 changed files with 2 additions and 7 deletions

View file

@ -1547,7 +1547,7 @@ class TestToolCallsInOutput:
assert output[0]["call_id"] == "call_abc123"
assert output[1]["type"] == "function_call_output"
assert output[1]["call_id"] == "call_abc123"
assert output[1]["output"] == [{"type": "input_text", "text": "42"}]
assert output[1]["output"] == "42"
assert output[2]["type"] == "message"
assert output[2]["content"][0]["text"] == "The result is 42."