fix: fixes error forwarding to connectors - #5491
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughTracing now populates LLM response attributes for request and streaming failures that produce no response object. ChangesTracing error attribute coverage
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jul 23, 2026
roroghost17
marked this pull request as ready for review
July 23, 2026 10:55
coderabbitai
Bot
requested review from
Pratham-Mishra04,
TejasGhatte and
akshaydeo
July 23, 2026 10:56
Contributor
There was a problem hiding this comment.
This repository has used its 100 free open-source review credits for this billing period. An organization admin can enable additional billed reviews, or reviews resume next period.
18 tasks
akshaydeo
previously approved these changes
Jul 23, 2026
Contributor
Merge activity
|
akshaydeo
changed the base branch from
07-23-fix_fixes_whitespace_trimming_on_connectors_form_fields
to
graphite-base/5491
July 23, 2026 16:00
akshaydeo
dismissed stale reviews from coderabbitai[bot] and themself
July 23, 2026 16:00
The base branch was changed.
akshaydeo
pushed a commit
that referenced
this pull request
Jul 24, 2026
## Summary Tracing spans for failed streaming requests were silently reporting unknown status because error attributes were never stamped when a stream errored out. This fixes two code paths where a `BifrostError` exists but `PopulateLLMResponseAttributes` was never called: failed stream requests in the retry loop and streams that fail before the first chunk arrives during deferred span completion. ## Changes - In `executeRequestWithRetries`, added an `else if` branch to call `PopulateLLMResponseAttributes` with a nil response and the error when a stream request fails — previously the cast to a non-stream response type would miss this case entirely. - In `completeDeferredSpan`, added an `else if` branch to stamp error attributes when a stream errors before producing any chunks, ensuring the span is not left with unknown/empty attributes. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Trigger a streaming request that is expected to fail (e.g., invalid model name, bad credentials, or a provider that returns an error before streaming begins) and verify that the resulting trace span contains the correct error attributes rather than reporting unknown status. ```sh go test ./... ``` ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations No security implications. This change only affects observability/tracing attribute population. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
akhsaul
pushed a commit
to akhsaul/bifrost
that referenced
this pull request
Aug 27, 2026
## Summary Tracing spans for failed streaming requests were silently reporting unknown status because error attributes were never stamped when a stream errored out. This fixes two code paths where a `BifrostError` exists but `PopulateLLMResponseAttributes` was never called: failed stream requests in the retry loop and streams that fail before the first chunk arrives during deferred span completion. ## Changes - In `executeRequestWithRetries`, added an `else if` branch to call `PopulateLLMResponseAttributes` with a nil response and the error when a stream request fails — previously the cast to a non-stream response type would miss this case entirely. - In `completeDeferredSpan`, added an `else if` branch to stamp error attributes when a stream errors before producing any chunks, ensuring the span is not left with unknown/empty attributes. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Trigger a streaming request that is expected to fail (e.g., invalid model name, bad credentials, or a provider that returns an error before streaming begins) and verify that the resulting trace span contains the correct error attributes rather than reporting unknown status. ```sh go test ./... ``` ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations No security implications. This change only affects observability/tracing attribute population. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
occcat
pushed a commit
to occcat/bifrost
that referenced
this pull request
Sep 2, 2026
## Summary Tracing spans for failed streaming requests were silently reporting unknown status because error attributes were never stamped when a stream errored out. This fixes two code paths where a `BifrostError` exists but `PopulateLLMResponseAttributes` was never called: failed stream requests in the retry loop and streams that fail before the first chunk arrives during deferred span completion. ## Changes - In `executeRequestWithRetries`, added an `else if` branch to call `PopulateLLMResponseAttributes` with a nil response and the error when a stream request fails — previously the cast to a non-stream response type would miss this case entirely. - In `completeDeferredSpan`, added an `else if` branch to stamp error attributes when a stream errors before producing any chunks, ensuring the span is not left with unknown/empty attributes. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Trigger a streaming request that is expected to fail (e.g., invalid model name, bad credentials, or a provider that returns an error before streaming begins) and verify that the resulting trace span contains the correct error attributes rather than reporting unknown status. ```sh go test ./... ``` ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations No security implications. This change only affects observability/tracing attribute population. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
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.

Summary
Tracing spans for failed streaming requests were silently reporting unknown status because error attributes were never stamped when a stream errored out. This fixes two code paths where a
BifrostErrorexists butPopulateLLMResponseAttributeswas never called: failed stream requests in the retry loop and streams that fail before the first chunk arrives during deferred span completion.Changes
executeRequestWithRetries, added anelse ifbranch to callPopulateLLMResponseAttributeswith a nil response and the error when a stream request fails — previously the cast to a non-stream response type would miss this case entirely.completeDeferredSpan, added anelse ifbranch to stamp error attributes when a stream errors before producing any chunks, ensuring the span is not left with unknown/empty attributes.Type of change
Affected areas
How to test
Trigger a streaming request that is expected to fail (e.g., invalid model name, bad credentials, or a provider that returns an error before streaming begins) and verify that the resulting trace span contains the correct error attributes rather than reporting unknown status.
go test ./...Screenshots/Recordings
N/A
Breaking changes
Related issues
N/A
Security considerations
No security implications. This change only affects observability/tracing attribute population.
Checklist
docs/contributing/README.mdand followed the guidelines