Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
fix(streaming): stop sending trailing data: null after [DONE] (#483)
diegosouzapwc88c29eddc8a
diff --git a/open-sse/utils/streamHelpers.ts b/open-sse/utils/streamHelpers.tsindex 7aae52c88b..12f8e00aa1 100644--- a/open-sse/utils/streamHelpers.ts+++ b/open-sse/utils/streamHelpers.ts@@ -103,7 +103,7 @@ function cleanPerfMetrics(data) {// Format output as SSEexport function formatSSE(data, sourceFormat) {- if (data === null || data === undefined) return "data: null\n\n";+ if (data === null || data === undefined) return ""; // Skip null/undefined — never send `data: null` (#483)if (data && data.done) return "data: [DONE]\n\n";// OpenAI Responses API format