Skip to content

@langchain/anthropic@1.5.6

Choose a tag to compare

@github-actions github-actions released this 14 Aug 16:39
d0c905d

Patch Changes

  • #11342 3b0e4c4 Thanks @thushanth-bengre-langchain! - feat(anthropic): mark Anthropic provider errors as retryable or not

    Builds on stampRetryable in @langchain/core so 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 maxRetries to the retry loop, so a surrounding retry loop such as modelRetryMiddleware can take over instead of the two multiplying against each other.

    Errors keep their original class, so instanceof against the @anthropic-ai/sdk error types is unaffected.