Commit f15513c
committed
Surface model provider errors as run errors
Extend the existing model-error boundary beyond rate limits so known Bailian provider failures are emitted as AG-UI RUN_ERROR with original message text and optional diagnostic metadata.
Constraint: Aone 83711637 asks model-side stream errors to surface as run errors instead of text messages.
Rejected: status-code-only text promotion | generic assistant text can mention HTTP/status codes and must not terminate the stream.
Rejected: broad provider error framework | the current PR only needs a compact SDK-side classifier for known Bailian model errors.
Confidence: high
Scope-risk: moderate
Directive: Keep raw-text model-error patterns narrow; add negative tests whenever expanding provider text matching.
Tested: uv run ruff check changed files; uv run pytest tests/unittests/server tests/unittests/integration => 781 passed, 2 skipped; uv run mypy --config-file mypy.ini . => 377 source files clean; independent code-reviewer APPROVE; architect WATCH with no blockers after heuristic tightening.
Change-Id: Ibf1cbd9505b7064cbebd804383710fd7333455cd
Not-tested: GitHub CI and MR review-comment readback are pending because push/comment touch shared remote state.
Signed-off-by: congxiao.wxx <congxiao.wxx@alibaba-inc.com>1 parent e666ee7 commit f15513c
9 files changed
Lines changed: 579 additions & 55 deletions
File tree
- agentrun
- integration/langgraph
- server
- utils
- tests/unittests
- integration
- server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
| |||
961 | 958 | | |
962 | 959 | | |
963 | 960 | | |
964 | | - | |
| 961 | + | |
965 | 962 | | |
966 | 963 | | |
967 | 964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
343 | 341 | | |
344 | 342 | | |
345 | 343 | | |
346 | | - | |
| 344 | + | |
347 | 345 | | |
348 | 346 | | |
349 | 347 | | |
| |||
0 commit comments