Packages

@langchain/anthropic

1.6.6 · 20 Nov 2026MIT2.1M / weekRepositoryHomepagenpmAtom feed

Your version

149 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 1.6.6

    20 Nov 2026
    • Set finish_reason (the stop_reason), normalized_finish_reason and finish_state in response_metadata on invoke and streamed results, and emit them on message-finish. refusal and model_context_window_exceeded map to refusal and context_exceeded, and pause_turn sets finish_state: "suspended".

  2. 1.6.5

    13 Nov 2026
    • Fall back to tool_calls in AnthropicToolsOutputParser so withStructuredOutput works when streamed content is normalized to tool_call blocks

  3. 1.6.4

    11 Nov 2026
    • Breaking

      Require Zod 4.6.6 or newer for installed dependencies to exclude versions affected by GHSA-mrhx-c7xc-m3w5. Zod v3 schemas remain supported through the bundled zod/v3 entry point.

  4. 1.6.3

    10 Nov 2026
    • anthropic: Surface model refusals as ModelRefusalError

      A refusal stop reason maps to the content_filter finish reason in stream events, and withStructuredOutput throws ModelRefusalError on a refusal, including when thinking is enabled.

  5. 1.6.2

    9 Nov 2026
    • Report streamed usage from the cumulative message_delta usage, as langchain-anthropic does, so input and cache tokens from server tool passes (e.g. web search) are counted and output tokens aren't double counted.

    • Support Claude Fable 5.2 and Mythos 5.2 profiles, always-on adaptive thinking, and the nameless computer toolset. Upgrade the Anthropic SDK and avoid forced tool choice for always-on thinking models.

  6. 1.6.1

    7 Nov 2026
    • anthropic: Keep streamed server_tool_use input when replaying messages

  7. 1.6.0

    22 Oct 2026
    • Stream tool-call args as tool-call-delta slices

      Tool-call and server-tool-call args now stream as tool-call-delta events, which carry only the new slice of the args, instead of block-delta snapshots of the args so far. A large tool call now costs about the same bytes on the wire as the same length of text.

  8. 1.5.13

    20 Oct 2026
    • anthropic: Declare mid-conversation support in model profiles. Claude Opus 4.8, Opus 5, Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5 and 5.1, and Mythos 5 and 5.1 set midConversationSystemMessages and midConversationTools. Sonnet 5 sets system messages only.

      Regenerating the profiles from models.dev also adds Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5, removes Claude Opus 4.1, and lowers Claude Sonnet 4.5's maxInputTokens to 200,000.

  9. 1.5.12

    1 Oct 2026
    • anthropic: Support mid-conversation tool changes. A SystemMessage can now carry Anthropic's tool_addition and tool_removal blocks, either bare in content or wrapped in a non_standard block, and they reach the provider verbatim. The required beta is added automatically: mid-conversation-tool-changes-2026-07-01 for tools named by reference, or inline-tools-2026-09-15 when a tool_addition defines a tool by value (tool: { type: "tool_definition", definition }).

      System content is now narrowed to what Anthropic accepts there. text, tool_addition and tool_removal are sent; any other block is dropped instead of being forwarded for the provider to reject. A system message left with no content is omitted.

  10. 1.5.11

    21 Sep 2026
    • anthropic: Accept a SystemMessage anywhere in the message list. Previously only the first message could be a system message. Anything else threw.

      A system message that isn't first is now sent at its own position. It applies from that point in the conversation onwards, and adding one leaves the prompt cache for the earlier turns intact.

      Two smaller changes come with it. A leading run of two or more SystemMessages now merges into the top-level system field instead of being rejected. System content built from standard content blocks no longer sends the internal block id to the provider.

  11. 1.5.10

    9 Sep 2026
    • Add support for Claude Fable 5.1.

  12. 1.5.9

    1 Sep 2026
    • anthropic: Add claude-sonnet-5 support

  13. 1.5.8

    20 Aug 2026
    • Preserve the generic tool_search_tool_result block type in streaming output and message payload conversion. The Anthropic API emits this un-suffixed type for both tool search variants; previously only the variant-suffixed names were allowlisted, so multi-turn conversations using tool search still failed with INVALID_TOOL_RESULTS after a client-tool round-trip.

  14. 1.5.7

    20 Aug 2026
    • Round-trip the tool search server-tool result blocks (tool_search_tool_bm25_tool_result / tool_search_tool_regex_tool_result) through message translation, mirroring web_search_tool_result. Without this, a multi-turn conversation using the tool search tool fails on the next request with 400 invalid_request_error … tool use … found without a corresponding … tool_result block, because the result block was dropped from the assistant message (streaming capture) and on re-send (toolTypes passthrough).

  15. 1.5.6

    14 Aug 2026
    • 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.

  16. 1.5.5

    13 Aug 2026
    • anthropic: Preserve gateway cost on the native stream path

      convertAnthropicStream now surfaces an Anthropic-compatible gateway's numeric usage.cost at response_metadata.usage.cost, matching the chunk path. Token accounting in usage_metadata is unchanged.

  17. 1.5.4

    5 Aug 2026
    • Add LangSmith Gateway environment configuration to OpenAI, Anthropic, and Fireworks chat models.

    • anthropic: Filter tools with unsupported root schema composition

  18. 1.5.3

    5 Aug 2026
    • Preserve gateway-provided cost metadata in Anthropic streams.

  19. 1.5.2

    24 Jul 2026
    • anthropic: Add claude-opus-5 support

  20. 1.5.1

    22 Jun 2026
    • Stop sending thinking: { type: "disabled" } on ChatAnthropic requests when the user never configured thinking. The disabled value is now only emitted when it is explicitly set, so adaptive-only models (e.g. claude-fable-5) that reject an explicit thinking.type: "disabled" no longer fail with a 400 on a default ChatAnthropic instance.

  21. 1.5.0

    17 Jun 2026
    • anthropic: Update native streamEvents event coverage

  22. 1.4.1

    12 Jun 2026
  23. 1.4.0

    18 May 2026
    • anthropic: Support strict tool calling for custom tools

  24. 1.3.28 – 1.3.292 releases without a noteShow each
  25. 1.3.27

    22 Apr 2026
    • anthropic: Add Claude Opus 4.7 compatibility updates

  26. 1.3.26

    31 Mar 2026
    • Implement tool choice required on anthropic

  27. 1.3.25

    18 Mar 2026
    • Add default max tokens for sonnet

  28. 1.3.24

    17 Mar 2026
    • Fix temperature/topK/topP handling: guard all three so undefined values are not
      set on the request object, and fix broken topK/topP validation when thinking is
      enabled.

  29. 1.3.23

    11 Mar 2026
    • anthropic: Prevent cache token double-counting in streaming

  30. 1.3.22

    3 Mar 2026
    • anthropic: Implement standard schema support for structured output

  31. 1.3.21

    26 Feb 2026
    • Add package version metadata to runnable traces. Each package now stamps its version in this.metadata.versions at construction time, making version info available in LangSmith trace metadata.

    • anthropic: Only set topP when defined to avoid API error

  32. 1.3.20

    23 Feb 2026
    • 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.

    • Replace retired Anthropic model IDs with active replacements

  33. 1.3.19

    20 Feb 2026
  34. 1.3.18

    17 Feb 2026
    • core: Add ContextOverflowError, raise in anthropic and openai

    • core: Add namespace-based symbol branding for error class hierarchies

      Introduces createNamespace utility for hierarchical symbol-based branding of class hierarchies.
      All LangChain error classes now use this pattern, replacing hand-rolled duck-type isInstance checks
      with reliable cross-realm Symbol.for-based identity.

  35. 1.3.17

    11 Feb 2026
    • anthropic: Update MODEL_DEFAULT_MAX_OUTPUT_TOKENS with correct values for all Claude models

  36. 1.3.16

    9 Feb 2026
  37. 1.3.15

    5 Feb 2026
    • anthropic: Add Claude Opus 4.6 support with adaptive thinking, effort parameter, compaction API, output_config migration, inference_geo, and structured outputs GA

  38. 1.3.14

    4 Feb 2026

    Only updates a dependency:@langchain/core 1.1.19

  39. 1.3.13

    30 Jan 2026
    • Handle standard file content blocks

    • Improved abort signal handling for chat models:

    • providers: Add proper abort signal handling for invoke and stream operations

      This enables proper cancellation behavior for both invoke and streaming operations, and allows fallback chains to correctly proceed to the next runnable when the previous one is aborted.

  40. 1.3.12

    24 Jan 2026
  41. 1.3.11

    20 Jan 2026
    • anthropic: Consolidate input_json_delta blocks in streaming toolcalls

  42. 1.3.10

    14 Jan 2026
    • Fixed converting partial tool inputs

  43. 1.3.8

    13 Jan 2026
    • core: Properly elevate reasoning tokens

  44. 1.3.2 – 1.3.76 releases with no change for you5 dependency updates, 1 without a note@langchain/core 1.1.12Show each

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.