Skip to content

Fix OpenAI stream completion tracking#9

Draft
BenItBuhner wants to merge 1 commit into
mainfrom
cursor/osp-101-response-tracking-8eee
Draft

Fix OpenAI stream completion tracking#9
BenItBuhner wants to merge 1 commit into
mainfrom
cursor/osp-101-response-tracking-8eee

Conversation

@BenItBuhner

@BenItBuhner BenItBuhner commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Treat OpenAI-compatible data: [DONE] SSE frames as terminal instead of continuing to read the upstream socket.
  • Add a regression test for upstreams that send [DONE] but leave the stream open.

Tests

  • bun install --frozen-lockfile
  • bun test tests/openai-stream-termination.test.ts
  • bun test ⚠️ fails in baseline tests/opencode-provider.test.ts because provider config opencode is missing from the clean worktree search paths.
  • bun run typecheck ⚠️ fails on pre-existing baseline errors: EnforceCallArgs.extraHeaders mismatch in src/server/routes/openai.ts and Bun fetch typing issues in tests/models-list.test.ts.
Open in Web Open in Cursor 

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.

1 participant