Skip to content

fix: preserve Responses streaming error details - #706

Merged
TonsOfFun merged 2 commits into
activeagents:mainfrom
pcbeingused333:fix/responses-stream-errors-c2093
Nov 12, 2026
Merged

TonsOfFun merged 2 commits into
activeagents:mainfrom
pcbeingused333:fix/responses-stream-errors-c2093

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Fixes loss of Responses API streaming error details (follow-up to #613).

The SDK yields typed error and response.failed events for failures inside a successful HTTP stream. These events reached the provider's fallback branch, replacing the API error with Unexpected Response Chunk Type.

Handle both events by raising the existing ActiveAgent::Providers::Errors::ProviderError with the API code and message. A failed response with no error details gets a fallback message. Failed streams do not enter the successful completion branch. No HTTP status or retry classification is inferred from a streaming error code.

Testing and validation

Synthetic SSE responses exercise both event types through the SDK and provider, including a failed response without error details. All three regressions fail on main with the unexpected chunk error and pass with the fix. Together with the finish-reason tests: 6 tests, 9 assertions, no failures. The complete Responses provider area passes: 81 tests, 221 assertions. RuboCop reports no offenses in the changed Ruby files.

This change was prepared with assistance from an AI coding agent (Codex).

pcbeingused333 and others added 2 commits November 8, 2026 20:17
The CHANGELOG moved under this branch: activeagents#699 rewrote Unreleased and activeagents#701 to
activeagents#703 added entries. This keeps main's CHANGELOG and puts the Responses
streaming entry at the top of Unreleased → Fixed, tagged `(activeagent)`
like its neighbours.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PCEJHsJpjXpDa9Kuq9i4Yg
@TonsOfFun
TonsOfFun merged commit a0fb1c7 into activeagents:main Nov 12, 2026
13 of 18 checks passed
TonsOfFun added a commit to yorzi/activeagent that referenced this pull request Nov 12, 2026
activeagents#706 landed its CHANGELOG entry at the top of Unreleased → Fixed after this
branch was cut. This keeps main's CHANGELOG and puts the missed-gate entry
above it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PCEJHsJpjXpDa9Kuq9i4Yg
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.

2 participants