Skip to content

Support include_raw_response for simple, terminal, non-streaming errors#6307

Merged
shuyangli merged 10 commits intomainfrom
gb/terminal-errors
Feb 13, 2026
Merged

Support include_raw_response for simple, terminal, non-streaming errors#6307
shuyangli merged 10 commits intomainfrom
gb/terminal-errors

Conversation

@GabrielBianconi
Copy link
Member

@GabrielBianconi GabrielBianconi commented Feb 12, 2026

Towards #5859


Note

Medium Risk
Changes the shape/content of some error responses (conditionally via include_raw_response) and adds new error-wrapping logic; bugs here could affect clients’ error handling and debugging output.

Overview
Adds support for returning provider raw_response data on terminal, non-streaming inference failures when include_raw_response is enabled, for both the native /inference and OpenAI-compatible chat/completions endpoints.

This introduces error-tree traversal to extract provider raw_response strings into RawResponseEntry values (with model_inference_id now optional/omitted for failed inferences), wires new into_response_with_raw_entries handling into endpoint error paths, and updates Python/TS bindings plus E2E/unit tests to cover the new error payload fields. It also renames the Rust E2E helper to clarify it starts an OpenAI-only HTTP gateway with a unique DB.

Written by Cursor Bugbot for commit 8781805. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@GabrielBianconi
Copy link
Member Author

/merge-queue

@github-actions
Copy link
Contributor

🚀 Merge queue workflow triggered!

View the run: https://github.com/tensorzero/tensorzero/actions/runs/21968457223

@GabrielBianconi
Copy link
Member Author

/merge-queue

@github-actions
Copy link
Contributor

🚀 Merge queue workflow triggered!

View the run: https://github.com/tensorzero/tensorzero/actions/runs/21968947449

Base automatically changed from gb/api-type-in-errors to main February 13, 2026 00:55
@shuyangli shuyangli added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit 59f8bfd Feb 13, 2026
65 checks passed
@shuyangli shuyangli deleted the gb/terminal-errors branch February 13, 2026 17:12
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