Repository navigation
Commit 5735879
committed
fix(agents): detect thinking-block errors in ProviderHttpError.errorBody
The recovery predicate in shouldRecoverAnthropicThinkingError only
traversed cause, error, rawError, errorMessage, and message fields.
ProviderHttpError stores the raw Anthropic response on errorBody,
which contains the specific thinking-block signature rejection text,
while .message carries a generic user-facing string.
Adding errorBody to the error graph traversal lets the recovery path
detect the production error shape and fire the non-destructive repair
(repairRejectedThinkingReplayInSessionManager) instead of rethrowing
the HTTP 400 and bricking the session.
Test: added errorBody case to the wrapAnthropicStreamWithRecovery
parameterized test suite.
Fixes #983081 parent 816038e commit 5735879
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
749 | 761 | | |
750 | 762 | | |
751 | 763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
| |||
0 commit comments