Repository navigation
Python: Preserve server error codes in AG-UI RUN_ERROR events - #10198
Dhruv Shaswat (Dhruv-Sh-git) wants to merge 5 commits into
Conversation
|
/review |
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (2 commit(s)): e3420f5b623f, f2da18bdfc00
Model: gpt-5.6-sol
Overview
The change preserves an optional server-provided AG-UI RUN_ERROR code while retaining the existing RUN_ERROR fallback when no meaningful code is supplied. The protocol schema constrains the field to an optional string, both streaming and non-streaming responses use the same converter path, and focused converter and client tests cover the new behavior. No Critical, High, or Medium defect was established.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
|
Dhruv Shaswat (@Dhruv-Sh-git), the AG-UI change itself looks focused and #8828 is already |
|
Dhruv Shaswat (@Dhruv-Sh-git) Thanks for the update. Issue #8828 is open and has |
Motivation & Context
AGUIChatClientwas replacing the specific error codes sent by the AG-UI server with a generic"RUN_ERROR"code. This made it difficult for Python clients to identify the actual failure and decide whether an operation should be retried, resumed, or abandoned.This change preserves the original error code provided by the server while maintaining
"RUN_ERROR"as the fallback when no code is available.Description & Review Guide
What are the major changes?
AGUIEventConverter._handle_run_errorto use the error code supplied in the incoming event."RUN_ERROR"as the default when the event does not contain a meaningful error code.What is the impact of these changes?
AGUIChatClientnow exposes the actual server-side error codes to Python callers.What do you want reviewers to focus on?
"RUN_ERROR".Related Issue
Fixes #8828
AI Assistance
AI assistance details:
AI assistance was used to help with implementation guidance, regression test development, and preparation of the pull request description. I reviewed and verified the changes and take responsibility for the contribution.
Contribution Checklist