Change8

langchain==1.3.0a2

📦 langchainView on GitHub →
13 features🐛 24 fixes🔧 14 symbols

Summary

This release introduces significant updates to streaming protocols (v2 and v3), enhances agent capabilities with new middleware features, and includes numerous dependency bumps and bug fixes across various components.

Migration Steps

  1. Rename _SUPPORTED_PROVIDERS to _BUILTIN_PROVIDERS in langchain.

✨ New Features

  • Wired stream_events(version='v3') into create_agent.
  • Implemented stream_events(version='v3') protocol in core.
  • Added 'respond' decision to HITL middleware.
  • Added content-block-centric streaming (v2) in core.
  • Added 'ls_agent_type' tag on create_agent calls.
  • Added LangSmith integration metadata to create_agent and init_chat_model.
  • Added support for state updates from wrap_model_call with command(s).
  • Added threading context through create_agent flows + middleware.
  • Added 'ToolCallRequest' to middleware exports.
  • Added dynamic tool registration via middleware.
  • Added 'langchain-openrouter' provider package.
  • Added support for automatic server-side compaction in openai.
  • Added tracing for wrap model + tool call.

🐛 Bug Fixes

  • Ordered schema resolution: list replaces set so state_schema wins.
  • Fixed Fireworks to honor max_retries.
  • Corrected import paths in agent middleware docstrings.
  • Corrected import path in ModelCallLimitMiddleware docstring.
  • Fixed test cache hit/miss on lru.
  • Fixed lint_diff relative paths in package makefiles.
  • Recognized ChatAnthropicVertex in _get_approximate_token_counter.
  • Added missing ModelProfile fields and warned on schema drift in core/model-profiles.
  • Updated model provider classes for Azure AI Foundry in langchain/langchain-classic.
  • Fixed type: message for Responses API input items in openai.
  • Normalized custom detector output to prevent KeyError in hash/mask strategies.
  • Reverted addition of ChatAnthropicBedrockWrapper.
  • Fixed support for anthropic-bedrock in init_chat_model.
  • Allowed Gemini 3 models to use ProviderStrategy with tools.
  • Fixed token counting on partial message sequences.
  • Bumped min core version and improved approximate token counting.
  • Avoided UnboundLocalError when no AIMessage exists.
  • Reused ToolStrategy in agent factory to prevent name mismatch.
  • Fixed recursion limit for create_agent.
  • Fixed SummarizationMiddleware signature mismatch & config invocation.
  • Added metadata configuration to summarization model invocation.
  • Fixed trailing whitespace from the summarization prompt.
  • Improved grammar in SummarizationMiddleware system prompt.
  • Used usage metadata scaling in SummarizationMiddleware default token counter.

Affected Symbols