unstale

pypi / langchain

langchain

What changed in langchain 0.3 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.

11 breaking12 security4 deprecations73 new APIs and options1 performance14 behavior and defaults2 tooling77 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.0 on npm

langchain 1179 changes

Breaking changes 11

  • The minimum core dependency requirement was updated.

    1.3.5release notes

  • The ls_agent_type tag on create_agent calls was reverted.

    1.2.18release notes

  • Raises the minimum required core versions.

    1.2.16release notes

  • Pygments is updated across packages in response to CVE-2026-4539.

    1.2.14release notes

  • Approximate token counting is improved.

    1.2.9release notes

  • Updates the summarization prompt, which may change summarization behavior.

    1.2.5release notes

  • Input state no longer contains todos.

    1.0.4release notes

  • ToolNode support is removed from create_agent.

    1.0.0release notes

  • Renames create_react_agent to create_agent.

    1.0.0release notes

  • Adds todo middleware under the TodoListMiddleware name.

    1.0.0release notes

  • Removes ToolNode from agents.

    1.0.0release notes

Security 6

Deprecations 3

New APIs and options 69

  • HITL middleware adds opt-in per-call interrupts, allowing developers to enable interrupts for individual calls.

    1.4.6release notes

  • SummarizationMiddleware now accepts summarizer, allowing developers to provide a summarizer.

    1.4.5release notes

  • Adds MCPAdapter and the langchain.mcp namespace for working with MCP.

    1.4.0release notes

  • Supports a custom token_counter in ContextEditingMiddleware.

    1.3.16release notes

  • Adds standard model exception types for handling model errors.

    1.3.16release notes

  • Exposes trace_policy on AgentMiddleware so developers can configure its trace policy.

    1.3.15release notes

  • Adds LangSmith as a provider supported by init_chat_model.

    1.3.15release notes

  • Adds reasoning_effort as a standard chat model parameter.

    1.3.15release notes

  • Adds a state_schema parameter to wrap_tool_call for specifying the tool call's state schema.

    1.3.15release notes

  • Adds ToolErrorMiddleware.

    1.3.14release notes

  • Adds support for explicit prompt caching in the OpenAI integration.

    1.3.13release notes

  • Supports langchain-meta in init_chat_model.

    1.3.13release notes

  • Adds the meta extra for installing langchain-meta support.

    1.3.13release notes

  • Adds ProviderToolSearchMiddleware to LangChain.

    1.3.7release notes

  • The OpenAI integration now supports the apply_patch built-in tool.

    1.3.5release notes

  • Adds interrupt_mode to HumanInTheLoopMiddleware.

    1.3.3release notes

  • Adds a when predicate to HumanInTheLoopMiddleware.

    1.3.3release notes

  • Subagent runs are projected onto a typed run.subagents channel.

    1.3.3release notes

  • Stream transformers can now be registered on middleware.

    1.3.2release notes

  • Agent stream_events and astream_events support version="v3", providing typed projections for messages, tool calls, state, and other stream updates.

    1.3.0release notes

  • Adds the respond decision to HITL middleware.

    1.2.17release notes

  • Adds content-block-centric streaming (v2) for working with streamed content blocks.

    1.2.16release notes

  • Adds the ls_agent_type tag to create_agent calls.

    1.2.16release notes

  • Adds baseten to the built-in providers.

    1.2.13release notes

  • Adds LangSmith integration metadata to create_agent, giving developers metadata for LangSmith integration.

    1.2.13release notes

  • Adds LangSmith integration metadata to init_chat_model, giving developers metadata for LangSmith integration.

    1.2.13release notes

  • Tracing is added for wrap model and tool call operations.

    1.2.12release notes

  • A provider package for OpenRouter is available.

    1.2.11release notes

  • OpenAI supports automatic server-side compaction.

    1.2.11release notes

  • ToolCallRequest is now available from the middleware exports.

    1.2.8release notes

  • Middleware can dynamically register tools.

    1.2.7release notes

  • Adds metadata configuration to summarization model invocation, allowing developers to configure metadata for that invocation.

    1.2.5release notes

  • Agent name metadata was added, allowing agent names to be represented in metadata.

    1.2.4release notes

  • Adds support for the google_genai provider in init_embeddings.

    1.2.1release notes

  • Added extras to BaseTool.

    1.2.0release notes

  • Added a strict flag to ProviderStrategy structured output.

    1.2.0release notes

  • AIMessage supports an agent name.

    1.1.3release notes

  • Anthropic support adds the effort option.

    1.1.3release notes

  • init_chat_model supports Upstage (Solar).

    1.1.3release notes

  • Adds ModelRetryMiddleware.

    1.1.0release notes

  • SummarizationMiddleware now supports asynchronous summarization.

    1.1.0release notes

  • SummarizationMiddleware can use model context windows when deciding when to trigger summarization.

    1.1.0release notes

  • create_agent's system_prompt now supports SystemMessage, allowing developers to provide a system message directly.

    1.1.0release notes

  • model-profiles is available as an optional dependency.

    1.0.4release notes

  • Support was added for structured output retry middleware.

    1.0.3release notes

  • UsageMetadata is now exported for developers to use.

    1.0.3release notes

  • Adds an after_agent middleware hook.

    1.0.0release notes

  • Adds a before_agent middleware hook.

    1.0.0release notes

  • Adds ClaudeBashToolMiddleware for use with agents.

    1.0.0release notes

  • Adds context editing middleware.

    1.0.0release notes

  • Adds async support to create_agent.

    1.0.0release notes

  • Adds middleware support to create_agent.

    1.0.0release notes

  • Adds a decorator pattern for dynamically generated middleware.

    1.0.0release notes

  • Adds file-search middleware.

    1.0.0release notes

  • Adds middleware for selecting an LLM.

    1.0.0release notes

  • Adds model call limits.

    1.0.0release notes

  • Adds ModelFallbackMiddleware and a retry_model_request middleware hook.

    1.0.0release notes

  • Adds an override to model requests.

    1.0.0release notes

  • Adds PIIMiddleware.

    1.0.0release notes

  • Adds support for representing server side tools in model requests and updates tool handling.

    1.0.0release notes

  • Adds ShellToolMiddleware for use with agents.

    1.0.0release notes

  • Adds stuff and map reduce chains.

    1.0.0release notes

  • Adds middleware for retrying tool calls.

    1.0.0release notes

  • Adds middleware for limiting tool calls.

    1.0.0release notes

  • Adds an override to tool call requests.

    1.0.0release notes

  • Adds a tool emulator.

    1.0.0release notes

  • ToolRuntime can be injected into tools, including as the generic ToolRuntime[ContextT, StateT].

    1.0.0release notes

  • Adds asynchronous implementations for wrap_model_call middleware.

    1.0.0release notes

  • Adds an asynchronous implementation for wrap_tool_call middleware.

    1.0.0release notes

Performance 1

  • Initialization is faster, with a reported 15% reduction.

    1.2.14release notes

Behavior and default changes 13

  • Supports Bedrock Mantle chat models.

    1.4.3release notes

  • Middleware trace inputs are omitted, changing the inputs included in traces.

    1.4.0release notes

  • Filters internal middleware model calls out of the messages projection.

    1.3.15release notes

  • Trigger conditions now support AND-capable combinations in SummarizationMiddleware.

    1.3.5release notes

  • Results are sorted by modification time, newest first.

    1.3.2release notes

  • Context is threaded through create_agent flows and middleware.

    1.2.9release notes

  • wrap_model_call supports state updates using commands.

    1.2.9release notes

  • Summarization is engaged based on reported usage_metadata.

    1.2.3release notes

  • Run IDs use uuid7.

    0.3.28, 1.1.1release notesrelease notes

  • Provider strategy now references model profiles.

    1.1.0release notes

  • The default recursion limit was increased.

    1.0.5release notes

  • Fixes the default for ToolRuntime args.

    1.0.1release notes

  • Tool node error handlers can use PEP 604 union types.

    1.0.0release notes

Tooling 2

  • Overloads were added to create_agent, improving its type signatures for developers.

    1.3.8release notes

  • Adds a developer experience for dynamic prompts.

    1.0.0release notes

Fixes and other changes 74

  • Retries the summary step on context overflow.

    1.4.4release notes

  • Repairs invalid tool calls.

    1.4.3release notes

  • GPT-6 structured output is recognized without profiles.

    1.4.3release notes

  • Model-generated tool calls are preserved when editing tool calls in HITL.

    1.4.2release notes

  • Preserves open MCP object arguments.

    1.4.1release notes

  • Includes the model destination when routing agent tools.

    1.4.0release notes

  • Indexing in genai v1 streaming content was shored up.

    1.3.18release notes

  • Redaction now preserves the content-block shape.

    1.3.18release notes

  • Custom HITL rejection reasons are now framed correctly.

    1.3.17release notes

  • Preserves the ordering of repeated schemas in the final result.

    1.3.16release notes

  • Re-raises non-retryable exceptions instead of retrying them.

    1.3.16release notes

  • Adds aliases for Bedrock Mantle chat models.

    1.3.15release notes

  • Handles an import error involving model, preventing that error from disrupting LLMToolEmulator use.

    1.3.15release notes

  • Propagates control flow from model middleware.

    1.3.15release notes

  • Re-exports PIIMatch from the middleware package, making it available through that package.

    1.3.15release notes

  • Handles malformed structured-output responses.

    1.3.15release notes

  • Clears stale structured_response values between checkpointed turns.

    1.3.15release notes

  • Preserves history when summarization fails, avoiding loss of conversation history after a summary failure.

    1.3.15release notes

  • Prevents orphaned tool_calls in the middleware's end behavior.

    1.3.15release notes

  • Restricts narrowed ToolStrategy values in bound tools.

    1.3.15release notes

  • Retries only retryable exceptions, avoiding retries for exceptions that should not be retried.

    1.3.14release notes

  • Shell middleware no longer triggers a shared process-group kill.

    1.3.12release notes

  • Interrupts now propagate through ToolRetryMiddleware.

    1.3.12release notes

  • Only sets strict=True on tools for OpenAI-compatible models, avoiding strict mode for other providers.

    1.3.11release notes

  • Provider strategy detection now handles dated gpt-5.2 and gpt-5.4 snapshots.

    1.3.10release notes

  • The summary format was switched; the notes do not specify further details.

    1.3.10release notes

  • Typing support for async middleware decorators was fixed.

    1.3.8release notes

  • Structured output model fallbacks were tightened, changing when fallback models are used.

    1.3.8release notes

  • Preserves compatibility for summarization triggers.

    1.3.6release notes

  • Improves guidance provided when a human-in-the-loop action is rejected.

    1.3.4release notes

  • The final answer now lands in the last AIMessage.

    1.3.2release notes

  • Bedrock providers are aliased in the summarization token check.

    1.3.1release notes

  • Model provider classes are updated for Azure AI Foundry.

    1.2.14release notes

  • ChatAnthropicVertex is now recognized by the approximate token counter.

    1.2.14release notes

  • The recursion limit is updated for create_agent, including runtime recursion limit overrides.

    1.2.14release notes

  • Missing ModelProfile fields are added, and schema drift now triggers a warning.

    1.2.14release notes

  • Exports Runtime from agents.middleware so developers can import it from that module.

    1.2.13release notes

  • Adds type: message to Responses API input items.

    1.2.13release notes

  • Custom detector output is normalized to prevent KeyError in hash and mask strategies.

    1.2.11release notes

  • Supports anthropic-bedrock, allowing it to be used with init_chat_model.

    1.2.11release notes

  • Model errors raised by init_chat_model are more descriptive.

    1.2.11release notes

  • Gemini 3 models can use ProviderStrategy with tools.

    1.2.11release notes

  • Fixes token counting for partial message sequences.

    1.2.10release notes

  • Avoids an UnboundLocalError when no AIMessage exists.

    1.2.9release notes

  • Middleware response_format overrides now normalize raw schemas.

    1.2.9release notes

  • The agent factory reuses ToolStrategy to prevent name mismatches.

    1.2.8release notes

  • Fixed the signature mismatch and config invocation for SummarizationMiddleware.

    1.2.6release notes

  • Errors are more descriptive when a dependency is not installed.

    1.2.4release notes

  • Provider inference now handles mixed-case prefixes.

    1.2.4release notes

  • Messages generated from summarization are now tagged.

    1.2.4release notes

  • Summarization keeps tool call and AIMessage pairings intact.

    1.2.3release notes

  • Fixes a copy-paste error in the azure_openai embedding provider map.

    1.2.3release notes

  • Planning middleware now handles parallel usage of the todo tool.

    1.2.2release notes

  • Improves validation in init_chat_model.

    1.2.1release notes

  • Message summarization now uses get_buffer_string to format messages.

    1.2.1release notes

  • Resolves a race condition in ShellSession.execute().

    1.2.1release notes

  • Injected arguments are excluded from tool schemas.

    1.2.1release notes

  • Fixed helper logic for using init_chat_model with the HuggingFace backend.

    1.2.0release notes

  • Added a sentinel value for strict mode in ProviderStrategy.

    1.2.0release notes

  • Fixed a multithreading race condition affecting shell output.

    1.2.0release notes

  • Types were added to the human-in-the-loop middleware.

    1.1.1release notes

  • Token counts are adjusted based on the model.

    1.1.1release notes

  • Adds missing async hooks.

    1.1.0release notes

  • Adds filesystem middleware in init.

    1.1.0release notes

  • Restores backward compatibility for response_format.

    1.1.0release notes

  • Fixes create_agent response_format handling for the Responses API.

    1.1.0release notes

  • The resumable shell now works with interrupts.

    1.1.0release notes

  • HITL middleware no longer reorders tool calls.

    1.1.0release notes

  • Conditional edges are no longer traced.

    1.0.4release notes

  • Thread count is incremented only after successful executions.

    1.0.4release notes

  • Tool call limit middleware is more robust.

    1.0.4release notes

  • Non-LLM-controllable parameters are removed from the tool message when tool invocation fails.

    1.0.2release notes

  • LangChain v1 adds Python 3.14 support.

    1.0.0release notes

  • Adds state_schema back to create_agent.

    1.0.0release notes

langchain 0.315 changes

Security 6

  • The dumps implementation was hardened in the 0.3 release line.

    0.3.30release notes

  • LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust boundary warning

    0.3.30security advisory

  • The loads implementation was hardened in the 0.3 release line.

    0.3.30release notes

  • Deserialization is restricted in langchain.storage._lc_store.

    0.3.29release notes

  • load() is hardened against untrusted manifests.

    0.3.29release notes

  • A ReDoS vulnerability in the MRKL and ReAct action regex was patched.

    0.3.28release notes

Deprecations 1

New APIs and options 4

  • Anthropic chat model initialization accepts context_management.

    0.3.28release notes

  • The OpenAI integration adds support for minimal.

    0.3.28release notes

  • A function removes ANSI escape sequences.

    0.3.28release notes

  • The OpenAI integration adds support for verbosity.

    0.3.28release notes

Behavior and default changes 1

  • Usage streaming is enabled when using the default base URL and client.

    0.3.28release notes

Fixes and other changes 3

  • OpenAI ainvoke uses the asynchronous _aget_response method.

    0.3.28release notes

  • The method preserves the supplied LLM.

    0.3.28release notes

  • The model initializer handles the gpt-5 model name.

    0.3.28release notes