feat(agent): export StreamingError to public API#1200
Merged
joshua-mo-143 merged 1 commit into0xPlaygrounds:mainfrom Jan 5, 2026
Merged
feat(agent): export StreamingError to public API#1200joshua-mo-143 merged 1 commit into0xPlaygrounds:mainfrom
joshua-mo-143 merged 1 commit into0xPlaygrounds:mainfrom
Conversation
StreamingError was not re-exported despite being the error type in StreamingResult. This prevented users from pattern matching on error variants or implementing From<StreamingError> for custom error types when building multi-provider abstractions. Signed-off-by: Jiawei Zhao <Phoenix500526@163.com>
e5fa94c to
31bd411
Compare
joshua-mo-143
approved these changes
Jan 5, 2026
Collaborator
joshua-mo-143
left a comment
There was a problem hiding this comment.
lgtm, thank you for opening this PR!
1 task
Merged
ThomasMarches
pushed a commit
to ThomasMarches/rig
that referenced
this pull request
Feb 13, 2026
StreamingError was not re-exported despite being the error type in StreamingResult. This prevented users from pattern matching on error variants or implementing From<StreamingError> for custom error types when building multi-provider abstractions. Signed-off-by: Jiawei Zhao <Phoenix500526@163.com>
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.
Export
StreamingErrorfrom therig::agentmodule to enable proper error handling in multi-provider abstractions.Motivation
When building applications that support multiple LLM providers, a common pattern is to create an enum wrapper to abstract over different model types:
To unify error handling across these providers, users need to define their own error types and implement conversions from the underlying errors:
However, StreamingError was not re-exported from the agent module, making this pattern impossible.
The Problem
StreamingResult is defined as:
This inconsistency prevents users from implementing fine-grained error handling or building provider-agnostic abstractions.
Closes: #1208