mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
fix(responses): handle response.done terminal events (#2142)
Treat response.done as a terminal OpenAI Responses stream event so passthrough streams ending with response.done are not flagged incomplete and no synthetic response.failed is emitted. Restore the data: [DONE] sentinel for same-format Responses passthrough streams. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
decolua
co-authored by
Cursor
parent
373850ee36
commit
a9785a5f70
@@ -5,6 +5,7 @@ import { formatSSE } from "./streamHelpers.js";
|
||||
// Responses API events that signal the stream has reached a terminal state
|
||||
const OPENAI_RESPONSES_TERMINAL_EVENTS = new Set([
|
||||
"response.completed",
|
||||
"response.done",
|
||||
"response.failed",
|
||||
"error"
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user