github langchain-ai/langchainjs @langchain/anthropic@1.3.20

Patch Changes

  • #10117 66df7fa Thanks @hntrl! - fix(anthropic): convert tool_calls to tool_use blocks when AIMessage content is an empty array

    When AIMessage.content was an empty array [] with tool_calls present, the tool calls were silently dropped during message formatting. This caused Anthropic API requests to fail with a 400 error. The array content branch now appends any tool_calls not already represented in the content array as tool_use blocks, matching the behavior of the string content path.

  • #10108 e7576ee Thanks @hntrl! - fix: replace retired Anthropic model IDs with active replacements

    • Update default model in ChatAnthropic from claude-3-5-sonnet-latest to claude-sonnet-4-5-20250929
    • Regenerate model profiles with latest data from models.dev API
    • Replace retired claude-3-5-haiku-20241022, claude-3-7-sonnet-20250219, claude-3-5-sonnet-20240620, and claude-3-5-sonnet-20241022 in tests, docstrings, and examples

Don't miss a new langchainjs release

NewReleases is sending notifications on new releases.