Releases: langchain-ai/langchain
langchain==1.3.1
langchain==1.3.0
This release adds support for version="v3" in stream_events / astream_events for langchain agents. Refer to the event streaming guide for details.
langchain-core==1.4.0
Changes since langchain-core==0.3.86
chore(infra): merge v1.4 into master (#37350)
chore: bump urllib3 from 2.6.3 to 2.7.0 in /libs/core (#37329)
fix(core): avoid eager pydantic.v1 import in @deprecated (#37308)
chore: bump mistune from 3.1.4 to 3.2.1 in /libs/core (#37237)
chore: bump jupyter-server from 2.17.0 to 2.18.0 in /libs/core (#37204)
release(core): 1.3.3 (#37198)
fix(core): set deprecation since to 1.3.3 to match release (#37200)
fix(core, langchain): harden load() against untrusted manifests (#37197)
chore: bump notebook from 7.5.0 to 7.5.6 in /libs/core (#37109)
chore: bump types-pyyaml from 6.0.12.20250915 to 6.0.12.20260408 in /libs/core (#37129)
fix(core): preserve structured inputs on tool runs in tracers (#37108)
release(perplexity): 1.2.0 (#37091)
chore(docs): update x handle references (#37081)
fix(core): make removal optional in warn_deprecated (#37056)
fix(core): validate batch_size in _batch and _abatch to prevent infinite loop (#36663)
chore(core): mark stream_v2/astream_v2 as beta (#36992)
release(core): 1.3.2 (#36990)
feat(core): add content-block-centric streaming (v2) (#36834)
release(core): 1.3.1 (#36972)
feat(core): allow _format_output to pass through list of ToolOutputMixin instances (#36963)
chore: bump nbconvert from 7.17.0 to 7.17.1 in /libs/core (#36923)
feat(core): Update inheritance behavior for tracer metadata for special keys (#36900)
chore: bump langsmith from 0.7.13 to 0.7.31 in /libs/core (#36813)
release(core): release 1.3.0 (#36851)
release(core): 1.3.0a3 (#36829)
chore(core): keep checkpoint_ns behavior in streaming metadata for backwards compat (#36828)
feat(core): Add chat model and LLM invocation params to traceable metadata (#36771)
fix(core): restore cloud metadata IPs and link-local range in SSRF policy (#36816)
chore(deps): bump pytest to 9.0.3 (#36801)
chore(core): harden private SSRF utilities (#36768)
fix(openai): handle content blocks without type key in responses api conversion (#36725)
chore: bump pytest from 9.0.2 to 9.0.3 in /libs/core (#36719)
release(core): 1.3.0.a2 (#36698)
fix(core): Use reference counting for storing inherited run trees to support garbage collection (#36660)
docs(core): nit (#36685)
release(core): 1.3.0a1 (#36656)
chore(core): reduce streaming metadata / perf (#36588)
release(core): release 1.2.28 (#36614)
fix(core): add more sanitization to templates (#36612)
release(core): 1.2.27 (#36586)
fix(core): handle symlinks in deprecated prompt save path (#36585)
chore: add comment explaining pygments>=2.20.0 (#36570)
release(core): 1.2.26 (#36511)
fix(core): add init validator and serialization mappings for Bedrock models (#34510)
feat(core): add ChatBaseten to serializable mapping (#36510)
chore(core): drop gpt-3.5-turbo from docstrings (#36497)
fix(core): correct parameter names in filter_messages docstring example (#36462)
release(core): 1.2.25 (#36473)
fix(core): harden check for txt files in deprecated prompt loading functions (#36471)
fix(core): fixed typos in the documentation (#36459)
release(core): 1.2.24 (#36434)
feat(core): impute placeholder filenames for OpenAI file inputs (#36433)
chore: pygments>=2.20.0 across all packages (CVE-2026-4539) (#36385)
fix(core): add "computer" to _WellKnownOpenAITools (#36261)
release(core): 1.2.23 (#36323)
revert: Revert "fix(core): trace invocation params in metadata" (#36322)
chore: bump requests from 2.32.5 to 2.33.0 in /libs/core (#36243)
release(core): 1.2.22 (#36201)
fix(core): validate paths in prompt.save and load_prompt, deprecate methods (#36200)
release(core): 1.2.21 (#36179)
fix(core,model-profiles): add missing ModelProfile fields, warn on schema drift (#36129)
chore(core): remove stale blockbuster allowlist for deleted context module (#36168)
ci: suppress pytest streaming output in CI (#36092)
release(core): 1.2.20 (#36085)
fix(core): trace invocation params in metadata (#36080)
feat: Add LangSmith integration metadata to create_agent and init_chat_model (#35810)
feat(core): harden anti-ssrf (#35960)
ci: avoid unnecessary dep installs in lint targets (#36046)
docs(core): document base_url in mermaid api (#35961)
chore: bump orjson from 3.11.5 to 3.11.6 in /libs/core (#35805)
chore: housekeeping (#35850)
release(core): 1.2.19 (#35832)
chore(core): move BaseCrossEncoder to langchain-core (#35809)
chore: bump tornado from 6.5.2 to 6.5.5 in /libs/core (#35775)
release(core): 1.2.18 (#35704)
fix(core): fix double backticks in deprecation docstring for alternative_import (#35658)
fix(core): preserve default_factory when generating tool call schema (#35550)
feat(openai): support tool search (#35582)
chore: bump the minor-and-patch group across 3 directories with 7 updates (#35605)
release(core): 1.2.17 (#35527)
fix(core): extract usage metadata from serialized tracer message outputs (#35526)
chore: bump the langchain-deps group across 3 directories with 7 updates (#35513)
chore: bump the langchain-deps group across 3 directories with 14 updates (#35441)
release(core): 1.2.16 (#35439)
fix(core): treat empty tool chunk ids as missing in merge (#35414)
fix(core): improve error message for non-JSON-serializable tool schemas (#34376)
fix(core): improve typing/docs for on_chat_model_start to clarify required positional args (#35324)
perf(core): defer specific langsmith imports to reduce import time (#35298)
revert: add ChatAnthropicBedrockWrapper (#35371)
release(core): 1.2.15 (#35367)
fix(anthropic): replace retired model IDs in tests and docstrings (#35365)
feat(anthropic): add ChatAnthropicBedrock wrapper (#35091)
style: fix some ruff noqa (#35321)
release(core): 1.2.14 (#35328)
chore(core): remove langserve from sys info util, add deepagents (#35325)
fix(core): fix merge_lists incorrectly merging parallel tool calls (#35281)
fix(core): accept int temperature in _get_ls_params for LangSmith tracing (#35302)
revert: accept integer temperature values in _get_ls_params (#35319)
fix(core): accept integer temperature values in _get_ls_params (#35317)
docs(core): update load note to be precise (#35309)
fix(core): prevent recursion error when args_schema is dict (#35260)
fix(core): preserve index and timestamp fields when merging (#34731)
docs(core): add security warnings and best practices for deserialization (#35282)
docs: fix docstring inaccuracies and update outdated LangSmith URLs (#35283)
fix(core): correct misleading jinja2 sandboxing comment (#35183)
chore: bump the langchain-deps group across 3 directories with 8 updates (#35257)
release(core): 1.2.13 (#35230)
docs(core): expanded get_lc_namespace docstring (#35229)
feat(openrouter): add langchain-openrouter provider package (#35211)
style: bump ruff version to 0.15 (#35042)
release(core): 1.2.12 (#35192)
fix(core): fix setting ChatGeneration.text (#35191)
release(core): 1.2.11 (#35144)
fix(openai): sanitize urls when counting tokens in images (#35143)
chore(core): clean up docstring mismatch and redundant logic in langchain-core (#35064)
fix(core): replace bare except with Exception in tracer (#35138)
release(core): 1.2.10 (#35136)
chore(deps): bump the langchain-deps group across 3 directories with 40 updates (#35129)
chore(deps): bump the langchain-deps group across 3 directories with 11 updates (#35121)
feat(core): add ContextOverflowError, raise in anthropic and openai (#35099)
feat(model-profiles): add text_inputs and text_outputs (#35084)
feat(core): count tokens from tool schemas in count_tokens_approximately (#35098)
docs(core): add missing name docstring for RunnableSerializable (#35088)
release(core): 1.2.9 (#35025)
fix(core): adjust cap when scaling approximate token counts (#35017)
revert: precompile hex color regex pattern at module level (#35016)
chore: add make type target (#35015)
revert: "chore: add typing target in Makefile" (#35013)
chore: add typing target in Makefile (#35012)
fix(core): apply cap when scaling approximate token counts (#35005)
feat(core): allow scaling by reported usage when counting tokens approximately (#34996)
test(core): increase delta_time for flaky test (#34982)
chore: enrich pyproject.toml files (#34980)
release(core): 1.2.8 (#34975)
docs(core): add examples for pretty_repr, pretty_print (#34968)
docs(core): use proper admonition for get_buffer_string (#34967)
docs: add usage examples to core classes (#34841)
chore(core): fix docstring format (#34966)
chore(deps): bump the uv group across 20 directories with 3 updates (#34941)
docs: add example to create_message function docstring (#34851)
docs(core): clarify tool decorator argument and return type requirements (#34860)
fix(core): fix nested mustache variable extraction and update docs (#34872)
fix(core): allow base model annotations for empty model (#34932)
chore: upgrade urllib3 to 2.6.3 (#34940)
fix(core): prevent crash in ParrotFakeChatModel when messages list is empty (#34943)
fix(core): google docstring parsing with no arguments/reserved arguments (#34861)
test(core): add tests for approximate token counting with multimodal messages (#34898)
fix(core): replace Iterable with Iterator for block iteration (#34934)
fix(core): yield_blobs returns Iterator (#34935)
docs: Fix typo in Runnable description of async variants (#34905)
fix(core): raise outputparserexception for unknown tools (#34923)
docs(core): nit (#34914)
chore(core): nits (#34897)
feat(core): add multimodal support to count_tokens_approximately (#34883)
fix(core): fix typo 'use a a' -> 'use as a' in check_version.py (#34878)
style(core): lint (#34862)
feat(core): add XML format option for get_buffer_string (#34802)
chore(core): relax packaging constraints (#34832)
chore(deps-dev): bump setuptools from 67.8.0 to 78.1.1 in /libs/core in the uv group across 1 directory (#34825)
chore(core, langchain): add version consistency check pre-commit hooks (#34782)
docs(core): enhance docstring for RunnableConfig for clarity on total=False (#34756)
docs(core): clean up callbacks param descriptions (#...
langchain==1.2.18
Changes since langchain==1.2.17
release(langchain): 1.2.18 (#37250)
revert: feat(langchain): ls_agent_type tag on create_agent calls (#37249)
chore(langchain-classic): deprecate hub, limit loads/dumps (#37234)
refactor(langchain-classic): retarget deprecations to create_agent, other chores (#37164)
chore(langchain,langchain-classic): uncomment optional deps (#37163)
release(fireworks): 1.2.1 (#37113)
langchain==0.3.30
langchain-core==0.3.86
Changes since langchain-core==0.3.85
release(core): 0.3.86 (#37242)
fix(core): backport path-traversal fix to v0.3 (CVE-2026-34070, GHSA-qh6h-p6c9-ff54) (#37233)
langchain-classic==1.0.7
langchain==1.3.0a2
Initial release
release(langchain): 1.3.0a2 (#37225)
release(langchain): 1.3.0a2 (#37224)
fix(langchain): ordered schema resolution — list replaces set so state_schema wins (#37223)
release(langchain): 1.3.0a1 (#37140)
feat(langchain): wire stream_events(version='v3') into create_agent (#37136)
Merge remote-tracking branch 'origin/master' into v1.4
feat(core): stream_events(version='v3') protocol (#37111)
release(fireworks): 1.2.1 (#37113)
release(langchain): 1.2.17 (#37110)
feat(langchain): add respond decision to HITL middleware (#37095)
release(langchain): 1.2.16 (#37085)
chore(docs): update x handle references (#37081)
release(anthropic): 1.4.2 (#37061)
perf(langchain): stop inlining agent state into tool-dispatch Sends (#36960)
docs(langchain): correct import paths in agent middleware docstrings (#36987)
hotfix: bump min core versions (#36996)
release(openai): 1.2.1 (#36995)
feat(core): add content-block-centric streaming (v2) (#36834)
fix(fireworks): honor max_retries (#36973)
release(openai): 1.2.0 (#36961)
docs(langchain): correct import path in ModelCallLimitMiddleware docstring (#36895)
feat(langchain): ls_agent_type tag on create_agent calls (#36774)
release(core): release 1.3.0 (#36851)
chore: bump langsmith from 0.6.3 to 0.7.31 in /libs/langchain_v1 (#36800)
chore(deps): bump pytest to 9.0.3 (#36801)
chore: bump pytest from 9.0.2 to 9.0.3 in /libs/langchain_v1 (#36717)
chore: bump pillow from 12.1.1 to 12.2.0 in /libs/langchain_v1 (#36710)
test(langchain): test cache hit/miss on lru (#36659)
perf(langchain): add lru cache when resolving types (#36649)
perf(langchain): add another init test with middleware (#36644)
chore(core): reduce streaming metadata / perf (#36588)
perf(langchain): add benchmark command (#36641)
chore: bump cryptography from 46.0.6 to 46.0.7 in /libs/langchain_v1 (#36619)
docs(langchain): add missing baseten and litellm to init_chat_model (#36562)
release(core): 1.2.26 (#36511)
release: langchain v1.2.15 (#36496)
chore: bump aiohttp from 3.13.3 to 3.13.4 in /libs/langchain_v1 (#36438)
release(langchain): 1.2.14 (#36396)
chore: pygments>=2.20.0 across all packages (CVE-2026-4539) (#36385)
test(langchain): cover runtime recursion limit override in create_agent (#36376)
perf(langchain): reduce init speed by 15% (#36375)
fix(langchain): update recursion limit for create_agent (#36351)
fix(infra): correct lint_diff relative paths in package makefiles (#36333)
chore: bump cryptography from 46.0.5 to 46.0.6 in /libs/langchain_v1 (#36324)
fix(langchain): recognize ChatAnthropicVertex in _get_approximate_token_counter (#36320)
chore(langchain): remove unnecessary description for toods list as a group (#36315)
chore(langchain): add async implementation to todolist and test (#36313)
chore(langchain): speed up todo list middleware init (#36311)
chore: bump requests from 2.32.5 to 2.33.0 in /libs/langchain_v1 (#36241)
chore(partners): bump langchain-core min to 1.2.21 (#36183)
fix(core,model-profiles): add missing ModelProfile fields, warn on schema drift (#36129)
fix(langchain,langchain-classic): update model provider classes for Azure AI Foundry (#35812)
release(langchain): 1.2.13 (#36111)
ci: suppress pytest streaming output in CI (#36092)
feat: Add LangSmith integration metadata to create_agent and init_chat_model (#35810)
ci: avoid unnecessary dep installs in lint targets (#36046)
chore: bump pyasn1 from 0.6.2 to 0.6.3 in /libs/langchain_v1 (#36029)
chore: bump pyjwt from 2.10.1 to 2.12.0 in /libs/langchain_v1 (#36024)
fix(langchain): export Runtime from agents.middleware (#35975)
chore: bump locks, lint (#35985)
fix(openai): add type: message to Responses API input items (#35693)
chore: bump black from 25.11.0 to 26.3.1 in /libs/langchain_v1 (#35802)
chore: bump orjson from 3.11.5 to 3.11.6 in /libs/langchain_v1 (#35807)
chore(langchain): add baseten to _BUILTIN_PROVIDERS (#35777)
release(langchain_v1): 1.2.12 (#35770)
feat: tracing for wrap model + tool call (#35765)
release(langchain_v1): 1.2.11 (#35723)
fix(langchain): normalize custom detector output to prevent KeyError in hash/mask strategies (#35651)
chore: bump the minor-and-patch group across 3 directories with 7 updates (#35605)
chore(langchain): switch refs from gemini-3 to gemini-3.1 (#35535)
chore: bump the langchain-deps group across 3 directories with 7 updates (#35513)
chore: bump langgraph-checkpoint from 3.0.1 to 4.0.0 in /libs/langchain_v1 (#35445)
chore: bump the langchain-deps group across 3 directories with 14 updates (#35441)
chore: bump google-cloud-aiplatform from 1.127.0 to 1.133.0 in /libs/langchain_v1 (#35397)
revert: add ChatAnthropicBedrockWrapper (#35371)
fix(langchain): support anthropic-bedrock in init_chat_model (#35366)
style: fix some ruff noqa (#35321)
fix(langchain): allow Gemini 3 models to use ProviderStrategy with tools (#34464)
docs: fix docstring inaccuracies and update outdated LangSmith URLs (#35283)
feat(openai): support automatic server-side compaction (#35212)
chore: bump the langchain-deps group across 3 directories with 8 updates (#35257)
feat(openrouter): add langchain-openrouter provider package (#35211)
style: bump ruff version to 0.15 (#35042)
chore(deps): bump pillow from 12.0.0 to 12.1.1 in /libs/langchain_v1 (#35174)
chore(core): raise more descriptive model error in init_chat_model (#35167)
chore(deps): bump langsmith from 0.4.42 to 0.6.3 in /libs/langchain_v1 (#35149)
chore(deps): bump cryptography from 46.0.3 to 46.0.5 in /libs/langchain_v1 (#35148)
release(langchain): 1.2.10 (#35137)
chore(deps): bump the langchain-deps group across 3 directories with 40 updates (#35129)
chore(deps): bump the langchain-deps group across 3 directories with 11 updates (#35121)
fix(langchain): fix token counting on partial message sequences (#35101)
refactor(langchain): rename _SUPPORTED_PROVIDERS -> _BUILTIN_PROVIDERS (#35100)
fix(langchain): normalize raw schemas in middleware response_format override (#35019)
feat: support state updates from wrap_model_call with command(s) (#35033)
test(langchain): types in test_tool_call_limit and test_model_retry (#34629)
fix(langchain): bump min core version and improve approximate token counting (#35026)
release: langchain 1.2.9 (#35023)
feat: threading context through create_agent flows + middleware (#34978)
chore: add make type target (#35015)
revert: "chore: add typing target in Makefile" (#35013)
chore: add typing target in Makefile (#35012)
revert: use usage metadata scaling in SummarizationMiddleware default token counter (#35002)
fix(langchain): use usage metadata scaling in SummarizationMiddleware default token counter (#35001)
fix(langchain): avoid UnboundLocalError when no AIMessage exists (#34816)
chore: enrich pyproject.toml files (#34980)
release(langchain): 1.2.8 (#34976)
chore(deps): bump the uv group across 20 directories with 3 updates (#34941)
fix: reuse ToolStrategy in agent factory to prevent name mismatch (#34871)
chore: upgrade urllib3 to 2.6.3 (#34940)
feat(langchain): add ToolCallRequest to middleware exports (#34894)
style(langchain): lint (#34863)
fix(langchain): blocking unit test (#34866)
test(langchain): use blockbuster to detect blocking calls in the async event loop (#34777)
release: langchain 1.2.7 (#34854)
feat: dynamic tool registration via middleware (#34842)
fix(langchain): strip trailing whitespace from the summarization prompt (#34835)
fix(langchain): improve grammar in SummarizationMiddleware system prompt (#34834)
docs(langchain): nit (#34788)
chore(deps): bump the uv group across 5 directories with 5 updates (#34785)
chore(deps): bump the uv group across 8 directories with 6 updates (#34773)
chore(core, langchain): add version consistency check pre-commit hooks (#34782)
release(langchain): 1.2.6 (#34781)
fix(langchain): SummarizationMiddleware signature mismatch & config invocation (#34775)
release(langchain): 1.2.5 (#34772)
fix(langchain): add metadata configuration to summarization model invocation (#34763)
feat(langchain): update summarization prompt (#34754)
chore: add tests for agent name metadata when streaming (#34764)
Revert "metadata"
metadata
release: langchain 1.2.4 (#34755)
chore(langchain): add agent name metadata (#34743)
chore: update twitter URLs (#34736)
chore: add tests for private state attr use (really, lack thereof) (#34725)
docs(langchain): clarify model ID usage for reliable behavior (#34718)
fix(langchain): tag messages generated from summarization (#34693)
fix(langchain): activate test_return_direct_spec tests, fix types (#34565)
chore(langchain): fix types in test_todo, test_tool_retry (#34503)
chore(langchain): fix types in test_shell_tool (#34502)
chore(langchain): activate mypy warn_return_any rule (#34549)
chore(langchain): fix types in test_tool_selection and test_tool_emulator (#34499)
chore(langchain): fix types in test_shell_execution_policies (#34498)
chore(langchain): improve ignore_missing_imports config (#34551)
test(langchain): complete and activate test_responses tests (#34560)
fix(langchain): activate mypy warn-unreachable (#34553)
chore(langchain): fix types in test_injected_runtime_create_agent, test_create_agent_tool_validation (#34568)
chore(langchain): fix types in test_response_format and test_state_schema (#34571)
chore(langchain): remove generic from FakeToolCallingModel (#34572)
chore(langchain): fix types in test_context_editing, test_agent_name, test_response_format_integration (#34574)
chore(langchain): fix types in test_overrides (#34635)
feat(langchain): add state to _ModelRequestOverrides (#34692)
chore(langchain): fix types in test_tools (#34592)
chore(langchain): fix types in test_summarization (#34656)
test(langchain): activate test_responses_spec tests (#34564)
style(langchain): fix some ruff preview rules (#34663)
chore(langchain): fix types in test_framework (#34567)
chore(langchain): fix types in memory_assert, conftest, `conftest_checkpoin...