fix(openai): harden Chat-to-Responses compatibility (#5772)

Add a shared Responses-to-Chat stream state machine and use it from the OpenAI relay path. Preserve assistant text alongside tool calls, bind tool argument deltas by output_index, map incomplete finish reasons, support reasoning/custom tool events, and buffer upstream SSE for non-stream Chat clients.

Add deterministic service tests and relay SSE tests for the conversion path.

Related to #5745.
This commit is contained in:
Calcium-Ion
2026-06-27 19:16:56 +08:00
committed by GitHub
parent 626dadb556
commit 3a506f50f0
9 changed files with 1516 additions and 470 deletions
+4
View File
@@ -36,3 +36,7 @@ data/
token_estimator_test.go
skills-lock.json
.playwright-mcp
# Local-only live probes and scratch test workspaces.
.local-tests/
service/openaicompat/chat_responses_live_local_test.go