Skip to content

Fix parsing anthropic overloaded error#7317

Closed
thdxr wants to merge 1 commit intovercel:mainfrom
thdxr:patch-1
Closed

Fix parsing anthropic overloaded error#7317
thdxr wants to merge 1 commit intovercel:mainfrom
thdxr:patch-1

Conversation

@thdxr
Copy link
Copy Markdown
Contributor

@thdxr thdxr commented Jul 15, 2025

addresses #2453

it seems that for some reason the anthropic api is returning "details: null" in the error response for overloaded

{"type":"error","error":{"details":null,"type":"overloaded_error","message":"Overloaded"}}

this allows for parsing that properly and fixes retries being broken

@lgrammel
Copy link
Copy Markdown
Collaborator

this fix does not help with parsing. wrote a test that shows that the provided snippet parses fine #7323 . can you provide a reproduction?

lgrammel added a commit that referenced this pull request Jul 16, 2025
…7323)

## Background

#7317 indicated that certain errors cannot be parsed.

## Summary

Add test that shows overloaded errors can be parsed.

---------

Co-authored-by: Dax <[email protected]>
@thdxr
Copy link
Copy Markdown
Contributor Author

thdxr commented Jul 16, 2025

ah sorry about that thought i saw a .strict() call somewhere

let me try this again - hard to figure out because we can't force anthropic to produce an overloaded call

@lgrammel lgrammel closed this Jul 17, 2025
@gr2m gr2m added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/anthropic Issues related to the @ai-sdk/anthropic provider labels Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/anthropic Issues related to the @ai-sdk/anthropic provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants