Repository navigation
@langchain/anthropic@1.6.0
Minor Changes
-
#11986
2caf64dThanks @richardscarrott! - feat: stream tool-call args astool-call-deltaslicesTool-call and server-tool-call args now stream as
tool-call-deltaevents, which carry only the new slice of the args, instead ofblock-deltasnapshots of the args so far. A large tool call now costs about the same bytes on the wire as the same length of text.- This covers the compat bridge (any model that only implements
_streamResponseChunks), the OpenAI-compatible converter (OpenAI Completions, Groq, Mistral, IBM, OpenRouter, Perplexity, DeepSeek, Fireworks, Together AI and xAI Completions), OpenAI and xAI Responses, Anthropic (client and server tool calls) and Bedrock Converse. Google and Ollama still send one complete snapshot per call. - A tool call's
id,nameandindexgo oncontent-block-start, which carries no args. Anidornamethat arrives later reaches consumers oncontent-block-finish. - If you read raw events and their
block-deltafields.argsmid-stream, or write agent stream transformers that do, readtool-call-deltainstead.await stream,.toolCallsand the assembled message are unchanged. - Upgrade your clients first. Older clients mishandle
tool-call-delta. You need@langchain/langgraph-sdk1.12.6 or later;@langchain/react,@langchain/vue,@langchain/svelteor@langchain/angular1.2.6 or later; andlangchain-core1.6.13 or later for Python clients. - To hold back, pin
@langchain/corebelow 1.3.0. That also keeps you on@langchain/openai,@langchain/anthropic,@langchain/awsand@langchain/xaiversions that send snapshots.
- This covers the compat bridge (any model that only implements