Skip to content

fix(proxy): handle CRLF SSE delimiters (#1787)#1870

Open
zerone0x wants to merge 1 commit intofarion1231:mainfrom
zerone0x:fix/sse-crlf-delimiter-1787
Open

fix(proxy): handle CRLF SSE delimiters (#1787)#1870
zerone0x wants to merge 1 commit intofarion1231:mainfrom
zerone0x:fix/sse-crlf-delimiter-1787

Conversation

@zerone0x
Copy link
Copy Markdown

@zerone0x zerone0x commented Apr 3, 2026

Summary / 概述

  • handle SSE blocks delimited by \r\n\r\n by normalizing CRLF and splitting with a shared helper
  • apply the helper across all SSE parsing paths

Related Issue / 关联 Issue

Fixes #1787

Screenshots / 截图

Before / 修改前 After / 修改后

Checklist / 检查清单

  • pnpm typecheck passes / 通过 TypeScript 类型检查
  • pnpm format:check passes / 通过代码格式检查
  • cargo clippy passes (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)
  • Updated i18n files if user-facing text changed / 如修改了用户可见文本,已更新国际化文件

@farion1231
Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

兼容优化:希望兼容openai chat completions API格式下,sse data分割符为 \r\n\r\n 的情况,而不仅仅是标准的 \n\n

2 participants