Use OpenAI SDK for Responses API streaming

↗ view on GitHub · Claude · 2026-05-31 · e688ccbc

Replace the hand-rolled fetch + SSE parsing in the OpenAI adapter with the
official openai package. client.responses.create({ stream: true }) returns a
typed async-iterable of events, eliminating the manual TextDecoder/buffer and
extractSseJson machinery. Behavior, exports, and the tool-call loop are
unchanged.
Repository mwcyu/Mike-fork
Author Claude <noreply@anthropic.com>
Authored
Parents d39f5806
Stats 3 files changed , +86 , -163
Part of LLM streaming-loop refactor (SDK migration + provider-agnostic driver)

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-e688ccbc.md from inside the repo you want the change in.

⬇ Download capture-commit-e688ccbc.md