Patch Changes
-
#11342
3b0e4c4Thanks @thushanth-bengre-langchain! - feat(anthropic): mark Anthropic provider errors as retryable or notBuilds on
stampRetryablein@langchain/coreso the retry middleware can tell a transient failure from a deterministic one. Rate limits are marked retryable; context overflow, invalid tool results, bad credentials, and unknown models non-retryable. Anything else stays unmarked and retries as before.Also forwards a per-call
maxRetriesto the retry loop, so a surrounding retry loop such asmodelRetryMiddlewarecan take over instead of the two multiplying against each other.Errors keep their original class, so
instanceofagainst the@anthropic-ai/sdkerror types is unaffected.