Repository navigation
📭 fix: Reject Empty Provider Streams - #598
Conversation
|
Head: Rejects zero-chunk provider completion with a clear error. Preserves intentional restarts and emitted empty-content chunks. Regression coverage exercises all three stream paths across OpenAI, Anthropic, and Bedrock. Verified: 446 tests across 22 focused suites; workspace typecheck; touched-file lint/import checks; package build; built CommonJS/ESM smoke tests. All 13 CI checks passed. Independent source review: complete on this exact head, no findings at any severity. Reviewer did not run tests/builds; local verification above was run separately. No rejected findings. Not run locally: full test suite or live-provider integration tests. |
|
@codex review the latest head, final review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
A provider stream that yields zero chunks left
finalChunkundefined, returned[undefined], and crashed during tool-call collection with an opaque TypeError.Reject normal zero-chunk completion with
The model provider returned an empty response.before constructing the result. Preserve intentional preemption and emitted chunks with empty content.Add real-model regression coverage for local, custom
onChunk, and registered-handler streaming across OpenAI, Anthropic, and Bedrock.Fixes #594.
Verification
npx tsc --noEmit, touched-file ESLint/import checks, andnpm run buildpassed.1c2f587fa64ae9b0927a9a3252bf80b0e88eeafe: no findings. No findings to fix or reject.