Repository navigation
Conversation
CRITICAL FIX for AI SDK compatibility: **Problem:** 9router emitted 'data: [DONE]\n\n' even for non-streaming requests, causing AI SDK and other clients to fail JSON parsing. **Root Cause:** AI SDK's generateObject() sends stream: undefined (not false). The check stream !== false evaluated to true when stream was undefined, causing the SSE sentinel to be emitted incorrectly. **Solution:** Changed check from stream !== false to stream === true in: - open-sse/utils/stream.js (PASSTHROUGH mode + flush function) - open-sse/executors/github.js (TransformStream) Now data: [DONE] is ONLY emitted when explicitly streaming (stream: true). **Related:** This PR builds on decolua#285 (already merged) which added response_format support for Claude. Together these fixes enable full AI SDK structured output compatibility. Fixes AI SDK generateObject() and all structured output clients.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This draft PR mirrors upstream branch 'upstream-prs/pr-286' into 'master' for review, provenance, and later decision-making only.
It must not be merged wholesale. If we adopt anything from it, the intended path is commit-level intake only.
Upstream Source
Current Intake Recommendation
Selected Commits For Any Future Intake
master.Skipped / Excluded Scope
absorbed_noop.Acceptance Gates
Verification / Validation Checklist
master.Review Focus
masteralready ends non-streaming SSE flows correctlyNotes