Commit Graph
16591 Commits
Author SHA1 Message Date
ccurme 0082ce0de9 chore(infra): support langsmith gateway in CI (#39651) 2026-08-14 09:28:46 -04:00
pxmps f9ee55d94c fix(core): make abatch_iterate consistent with batch_iterate for None and zero size (#39367) 2026-08-13 17:27:44 -04:00
langchain-oss-model-profiles[bot]andmdrxy 162f9d9582 chore(model-profiles): refresh model profile data (#39625)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the [`refresh_model_profiles`
workflow](https://github.com/langchain-ai/langchain/blob/master/.github/workflows/refresh_model_profiles.yml).

## Summary of changes

**5 added · 1 removed · 3 changed** across 3 provider(s).

<details>
<summary>deepseek</summary>

**✏️ 1 changed**
- `deepseek-v4-pro`: last updated `2026-04-24` → `2026-08-12`; removed
open weights; release date `2026-04-24` → `2026-08-12`

</details>

<details>
<summary>openrouter</summary>

**➕ 4 added**
- `bytedance-seed/seed-2-1-turbo` — 262,144 ctx, 262,144 out,
text+image+video in, reasoning, tools
- `deepseek/deepseek-v4-pro-0813` — 1,048,576 ctx, 384,000 out,
reasoning, tools
- `qwen/qwen3.8-2.4t-a95b` — 1,000,000 ctx, 52,429 out, reasoning, tools
- `x-ai/grok-4.6` — 500,000 ctx, 500,000 out, text+image+pdf in,
reasoning, tools

**➖ 1 removed**
- `inclusionai/ling-3.0-tiny:free`

**✏️ 2 changed**
- `anthracite-org/magnum-v4-72b`: max input tokens 16,384 → 32,768; max
output tokens 2,048 → 4,096
- `nvidia/nemotron-3.5-lightning`: max input tokens 262,144 → 1,048,576;
added tool calling

</details>

<details>
<summary>xai</summary>

**➕ 1 added**
- `grok-4.6` — 500,000 ctx, 500,000 out, text+image+pdf in, reasoning,
tools

</details>

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-08-13 10:02:02 -07:00
ccurme a2f02abedb chore(langchain): update docs on error handling for json schema (#39632) 2026-08-13 15:32:24 +00:00
Hunter Lovell cde529347a fix(core): respect pydantic aliases when validating tool inputs (#39572) 2026-08-13 09:19:50 -04:00
ccurme fb8853d246 release(openai): 1.5.0 (#39629) langchain-openai==1.5.0 2026-08-13 13:00:21 +00:00
ccurmeandMason Daugherty ee88091dc0 feat(openai): support openai 3.0 SDK (#39613)
Co-authored-by: Mason Daugherty <github@mdrxy.com>
2026-08-13 12:44:32 +00:00
Mason Daugherty c5b2f95b5e release(anthropic): 1.5.6 (#39622)
Bumps `langchain-anthropic` from 1.5.5 to 1.5.6, a patch release
containing two fixes since the last release:

- `fix(anthropic):` normalize `tool_search_tool_result` blocks (#39621)
- `fix(anthropic):` correct model profile data for Fable 5, Sonnet 5,
Opus 4.1 (#39604)
langchain-anthropic==1.5.6
2026-08-12 18:17:55 -07:00
Hunter Lovell 3c6c3ba7bf fix(anthropic): normalize tool_search_tool_result blocks (#39621)
fixes #37584

* `tool_search_tool_result` blocks were being passed through unchanged,
which when streamed included a disallowed `index` field (this was
causing 400's with `ProviderToolSearchMiddleware`)
* this adds an additional case in the content block normalization step
to make sure that doesn't get tracked

ref:
https://platform.claude.com/docs/en/api/messages/create#tool_search_tool_result_block_param
2026-08-12 18:09:24 -07:00
Nishitha Mandopen-swe[bot] a648460cfd fix(core): issues in merging chunks (#39535)
Closes #38064, #35259, #38850

`merge_dicts`, `merge_lists`, and `AddableDict` all guessed at merge
semantics for streaming chunks in ways that silently corrupted data
instead of failing loudly:

- `merge_dicts` fell into the `int` branch for differing `bool` values
(since `bool` subclasses `int`) and summed them, turning `True + False`
into `1`. It now raises `TypeError`, consistent with other unmergeable
types.
- `merge_lists` used `"index" in e_left` on untyped list elements; when
an element was a plain `str` containing the literal substring `"index"`,
it then subscripted the string and raised an unrelated `TypeError`. It
now checks `isinstance(e_left, dict)` first.
- `AddableDict.__add__`/`__radd__` silently discarded the left-hand
value on any `TypeError` from `chunk[key] + other[key]`. They now
re-raise a `TypeError` naming the key and both types.

### Release note

`merge_dicts` now raises `TypeError` for differing boolean values at the
same key instead of silently summing them to an `int`; `AddableDict`
addition now raises `TypeError` on type-incompatible keys instead of
silently dropping data; `merge_lists` no longer misidentifies non-dict
elements as index-keyed.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-12 17:40:35 -04:00
Hunter Lovell 13b2f8d727 fix(core): handle v1 base model validation in async path (#39576) 2026-08-12 15:49:24 -04:00
ccurme 7fb045b744 fix(fireworks): avoid repeated service_tier [closes #39619] (#39620) 2026-08-12 19:41:51 +00:00
Hunter Lovelland王俊锋 624fd031c2 fix(core): handle tool descriptions for infer_schema=False (#39573)
Co-authored-by: 王俊锋 <37211900+kinch-tech@users.noreply.github.com>
2026-08-12 15:22:04 -04:00
Hunter Lovell dff3b73287 fix(langchain): preserve final repeated schema ordering (#39284) 2026-08-12 15:13:20 -04:00
iroiro147andChester Curme 1a2585ee5f fix(openrouter): preserve cost metadata in usage chunks (#39338)
Co-authored-by: Chester Curme <chester.curme@gmail.com>
2026-08-12 13:39:37 -04:00
ccurmeandSolaris-star 0a86934ab5 fix(core): clear usage metadata callback on exceptions in context manager (#39616)
Co-authored-by: Solaris-star <820622658@qq.com>
2026-08-12 13:32:51 -04:00
Mason Daugherty 2d47a5f398 chore(partners): bump langgraph floor in openai and huggingface lockfiles (#39617) 2026-08-12 09:58:11 -07:00
langchain-oss-model-profiles[bot]andmdrxy 4545c74216 chore(model-profiles): refresh model profile data (#39609)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the [`refresh_model_profiles`
workflow](https://github.com/langchain-ai/langchain/blob/master/.github/workflows/refresh_model_profiles.yml).

## Summary of changes

**4 added · 0 removed · 2 changed** across 1 provider(s).

### openrouter

**➕ 4 added**
- `bytedance-seed/seed-2.0-code` — 262,144 ctx, 131,072 out,
text+image+video in, reasoning, tools
- `liquid/lfm-2.5-2.6b:free` — 128,000 ctx, 32,768 out, reasoning, tools
- `nvidia/nemotron-3.5-lightning` — 262,144 ctx, 262,144 out, reasoning
- `nvidia/nemotron-3.5-lightning:free` — 1,000,000 ctx, 65,536 out,
reasoning, tools

**✏️ 2 changed**
- `z-ai/glm-5.2`: max output tokens 262,144 → 131,072
- `~deepseek/deepseek-v4-flash-latest`: max output tokens 131,072 →
262,144

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-08-12 09:56:35 -07:00
Hunter Lovell b6eccc5f97 fix(core): handle falsy LLM and chat model caches (#39283) 2026-08-12 12:39:16 -04:00
ccurme 5a28e17fbb chore(core): add httpx as an explicit dep (#39612) 2026-08-12 10:11:28 -04:00
Mason Daugherty 0727992d4a fix(anthropic): correct model profile data for Fable 5, Sonnet 5, Opus 4.1 (#39604)
Fixed `ChatAnthropic` model profiles: `claude-fable-5` and
`claude-sonnet-5` now correctly report structured output support,
`claude-fable-5` reports its reasoning effort levels and default, and
the retired `claude-opus-4-1` entry was removed.

---

Users calling `model.profile` on `ChatAnthropic` get wrong capability
data for three models:

- `claude-fable-5` reported `structured_output: false` and no
reasoning-effort metadata, even though Fable 5 supports structured
outputs and all five effort levels (`low` through `max`, defaulting to
`high`).
- `claude-sonnet-5` reported `structured_output: false` despite
supporting structured outputs.
- `claude-opus-4-1` lingered as a sparse augmentation-only entry (six
fields, no token limits or modalities) after models.dev dropped it —
Anthropic retired the model on 2026-08-05, so the entry is removed
rather than backfilled.

Corrections verified against Anthropic's [structured outputs
compatibility
list](https://platform.claude.com/docs/en/build-with-claude/structured-outputs),
[effort
docs](https://platform.claude.com/docs/en/build-with-claude/effort), and
[deprecation
schedule](https://platform.claude.com/docs/en/about-claude/model-deprecations).
`_profiles.py` regenerated with `langchain-profiles refresh --provider
anthropic`.
2026-08-11 21:45:00 -07:00
zerafachris 7cdf9658f0 fix(core): preserve non-str/non-dict items in DictPromptTemplate list values (#39588) 2026-08-11 21:32:33 -04:00
John Kennedyandlangsmith-fleet[bot] 2c3b11c6c4 chore: bump setuptools in Hugging Face lockfile (#39603)
## Summary

- bumps `setuptools` from 81.0.0 to 84.0.0 in
`libs/partners/huggingface/uv.lock`
- resolves Dependabot alert #3955 / GHSA-h35f-9h28-mq5c / CVE-2026-59890
(first patched version: 83.0.0)
- keeps the change scoped to the affected lockfile entry

## Validation

- [x] `uv sync --project libs/partners/huggingface --frozen
--no-install-project --no-dev`
- [x] verified resolved `setuptools==84.0.0` is outside the vulnerable
range
- [x] `git diff --check`

## Notes

`uv lock --locked` reports that the lockfile needs unrelated workspace
metadata updates (`langchain`, `langchain-core`, and `langgraph`). Those
unrelated refreshes were intentionally excluded to keep this security
patch narrow.

Co-authored-by: langsmith-fleet[bot] <langsmith-fleet[bot]@users.noreply.github.com>
2026-08-11 16:49:16 -07:00
Rin 61c5678835 fix(core): raise ValueError when explicit tool_outputs length mismatches tool_calls in tool_example_to_messages (#39142) 2026-08-11 18:54:59 -04:00
Willow Lopez e34cd76346 fix(core): guard malformed Anthropic content blocks (#38670) 2026-08-11 18:50:39 -04:00
ccurme 119bf69a1e release(anthropic): 1.5.5 (#39597) langchain-anthropic==1.5.5 2026-08-11 15:12:52 -04:00
ccurme f4bc5031db release(langchain): 1.3.15 (#39595) langchain==1.3.15 2026-08-11 14:39:46 -04:00
ccurme 5ff19c613a release(core): 1.5.4 (#39592) langchain-core==1.5.4 2026-08-11 13:43:45 -04:00
ccurme 1925966dc6 feat(langchain): expose trace_policy on AgentMiddleware (#38910) 2026-08-11 13:33:54 -04:00
langchain-oss-model-profiles[bot]andmdrxy ce8e8bd8b1 chore(model-profiles): refresh model profile data (#39579)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the [`refresh_model_profiles`
workflow](https://github.com/langchain-ai/langchain/blob/master/.github/workflows/refresh_model_profiles.yml).

## Summary of changes

**3 added · 1 removed · 8 changed** across 1 provider(s).

### openrouter

**➕ 3 added**
- `meta/muse-glimmer-30b` — 131,072 ctx, 131,072 out, text+image in,
reasoning, tools
- `sakana/sakana-namazu` — 262,144 ctx, 65,536 out, text+image+pdf in,
reasoning, tools
- `upstage/solar-pro4` — 524,288 ctx, 131,072 out, reasoning, tools

**➖ 1 removed**
- `openai/gpt-5.3-chat`

**✏️ 8 changed**
- `deepseek/deepseek-v4-pro`: max output tokens 384,000 → 393,216
- `inclusionai/ling-3.0-tiny:free`: added open weights
- `moonshotai/kimi-k3`: added video input
- `openai/gpt-5.2-chat`: max output tokens 16,384 → 32,000
- `qwen/qwen3-coder-30b-a3b-instruct`: max output tokens 32,768 →
262,144
- `qwen/qwen3-next-80b-a3b-thinking`: max output tokens 32,768 → 262,144
- `qwen/qwen3.5-397b-a17b`: max output tokens 65,536 → 262,144
- `~moonshotai/kimi-latest`: added video input

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-08-11 08:49:43 -07:00
ccurmeandPhilemon Schöpf a2a9b1bde4 fix(anthropic): report reasoning tokens in usage metadata (#39590)
Co-authored-by: Philemon Schöpf <philemon.schoepf@otera.ai>
2026-08-11 11:42:29 -04:00
ccurme 39b4e0f9a8 chore(langchain): fix type errors in tests (#39589) 2026-08-11 11:25:58 -04:00
langchain-oss-model-profiles[bot]andmdrxy f78df6d977 chore(model-profiles): refresh model profile data (#39430)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the [`refresh_model_profiles`
workflow](https://github.com/langchain-ai/langchain/blob/master/.github/workflows/refresh_model_profiles.yml).

## Summary of changes

**0 added · 0 removed · 5 changed** across 1 provider(s).

### openrouter

**✏️ 5 changed**
- `google/gemma-4-26b-a4b-it`: max output tokens 16,384 → 262,144
- `nvidia/nemotron-3-nano-30b-a3b`: max output tokens 262,144 → 228,000
- `qwen/qwen3-14b`: max output tokens 8,192 → 16,384
- `qwen/qwen3-next-80b-a3b-thinking`: max output tokens 262,144 → 32,768
- `z-ai/glm-5.2`: max output tokens 131,072 → 262,144

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-08-10 22:31:02 -07:00
ccurme 56daacc8df release(openai): 1.4.3 (#39485) langchain-openai==1.4.3 2026-08-10 09:11:27 -04:00
langchain-oss-model-profiles[bot]andmdrxy 24e8d2b596 chore(model-profiles): refresh model profile data (#39344)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the [`refresh_model_profiles`
workflow](https://github.com/langchain-ai/langchain/blob/master/.github/workflows/refresh_model_profiles.yml).

## Summary of changes

**0 added · 0 removed · 8 changed** across 1 provider(s).

### openrouter

**✏️ 8 changed**
- `deepseek/deepseek-v4-flash`: max output tokens 131,072 → 393,216
- `deepseek/deepseek-v4-flash-0731`: max output tokens 65,536 → 384,000
- `mancer/weaver`: max output tokens 2,000 → 6,000
- `qwen/qwen3-next-80b-a3b-thinking`: max output tokens 32,768 → 262,144
- `thinkingmachines/inkling`: max output tokens 1,048,576 → 262,144
- `thinkingmachines/inkling-small`: added structured output
- `undi95/remm-slerp-l2-13b`: max output tokens 2,048 → 6,144
- `~deepseek/deepseek-v4-flash-latest`: max output tokens 65,536 →
131,072

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-08-09 10:31:16 -07:00
ccurme 9b4ef2ab34 fix(openai): filter invalid tool calls from content (#39366) 2026-08-09 12:21:09 -04:00
ccurmeandPRINCE KUMAR MAURYA 9f738f5297 fix(core): compat with pydantic 2.14 (#39328)
Co-authored-by: PRINCE KUMAR MAURYA <218506877+alwaysprince05@users.noreply.github.com>
2026-08-09 11:46:45 -04:00
dependabot[bot] d048fbe170 chore: bump h2 from 4.3.0 to 4.4.1 in /libs/langchain (#39325)
Bumps [h2](https://github.com/python-hyper/h2) from 4.3.0 to 4.4.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/python-hyper/h2/blob/master/CHANGELOG.rst">h2's
changelog</a>.</em></p>
<blockquote>
<h2>4.4.1 (2026-08-03)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Performance improvement: remove consumed frames in-place from data
buffer.</li>
<li>Reject duplicate Host headers in request headers. Thanks to Sunand
Mohan for the report.</li>
</ul>
<h2>4.4.0 (2026-07-23)</h2>
<p><strong>API Changes (Backward Incompatible)</strong></p>
<ul>
<li>Support for Python 3.9 has been removed.</li>
<li>Support for PyPy 3.9 has been removed.</li>
<li><code>Stream.end_stream()</code> now raises
<code>NoSuchStreamError</code> or <code>StreamClosedError</code>
exceptions, instead of a generic <code>KeyError</code>.</li>
<li>Duplicate <code>content-length</code> headers with different values
now raise <code>ProtocolError</code>.
Previously, the first <code>content-length</code> header was accepted
and later conflicting values were ignored. Thanks to Harshal Parekh for
the report.</li>
<li>Parse <code>content-length</code> headers according to RFC9110
grammar for numbers (1*DIGIT). Thanks to Arkadiusz Marta for the
report.</li>
<li><strong>backfill from v4.3.0</strong> Convert emitted events into
Python <code>dataclass</code>, which introduces new constructors with
required arguments.
Instantiating these events without arguments, as previously commonly
used API pattern, will no longer work.</li>
</ul>
<p><strong>API Changes (Backward Compatible)</strong></p>
<ul>
<li>Support for Python 3.14 has been added.</li>
<li><code>H2Connection.receive_data</code> now accepts any byte-like
object that
implements the buffer protocol, such as <code>bytes</code>,
<code>bytearray</code>, and
<code>memoryview</code>. Existing <code>bytes</code> callers are
unaffected.</li>
<li>Align CONNECT pseudo-header validation with RFC 9113 s8.3 and RFC
8441 s4.
Ordinary CONNECT now requires <code>:method=CONNECT</code> and
<code>:authority</code>, and
forbids <code>:scheme</code>/<code>:path</code>. Extended CONNECT (e.g.,
WebSocket) requires
<code>:scheme</code>, <code>:path</code>, <code>:authority</code> plus
<code>:protocol</code>. (PR <a
href="https://redirect.github.com/python-hyper/h2/issues/1309">#1309</a>)</li>
<li>Fix incorrect substring matching of secure header in
<code>cookie</code> and <code>:method</code>.</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fix to allow sending 0 bytes on a stream even if the flow control
window is negative.</li>
<li>Reject non-zero <code>SETTINGS_ENABLE_PUSH</code> values received
from servers.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/python-hyper/h2/commit/bc239af1d1b85bc70482804f30a0e0e587d90a08"><code>bc239af</code></a>
v4.4.1</li>
<li><a
href="https://github.com/python-hyper/h2/commit/92b925ed1b1817c82db32893503f74f47fcf4452"><code>92b925e</code></a>
add test for duplicate host headers</li>
<li><a
href="https://github.com/python-hyper/h2/commit/292a40829feefda98c8509dcdbbb4a57af9bd6a6"><code>292a408</code></a>
reject duplicate Host headers in request headers</li>
<li><a
href="https://github.com/python-hyper/h2/commit/04d3b87cbc1db020d28c7cfb44fe194558efbdde"><code>04d3b87</code></a>
update changelog</li>
<li><a
href="https://github.com/python-hyper/h2/commit/439b970d0fa19891fa81068907de97dfa3a07c3a"><code>439b970</code></a>
prepare for next release cycle</li>
<li><a
href="https://github.com/python-hyper/h2/commit/9a7ff7430df669fa8e90b6121f3cc1ed64d1115a"><code>9a7ff74</code></a>
performance: remove consumed frames in place from data buffer (<a
href="https://redirect.github.com/python-hyper/h2/issues/1321">#1321</a>)</li>
<li><a
href="https://github.com/python-hyper/h2/commit/6cce763997eca5b826f3e435a611b7a7fc73f633"><code>6cce763</code></a>
v4.4.0</li>
<li><a
href="https://github.com/python-hyper/h2/commit/dfafda3b0cd96455b45d1785ef1ebc6968bba5cf"><code>dfafda3</code></a>
Bump pytest from 8.4.2 to 9.0.3 (<a
href="https://redirect.github.com/python-hyper/h2/issues/1320">#1320</a>)</li>
<li><a
href="https://github.com/python-hyper/h2/commit/b45207cedf9fabe2c77bb3c1c10f403a610599a0"><code>b45207c</code></a>
dependencies and packaging++</li>
<li><a
href="https://github.com/python-hyper/h2/commit/c40145f69c5473850849fe96301ac0416b1afea6"><code>c40145f</code></a>
parse <code>content-length</code> headers according to RFC9110 grammar
for numbers (1*DI...</li>
<li>Additional commits viewable in <a
href="https://github.com/python-hyper/h2/compare/v4.3.0...v4.4.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=h2&package-manager=uv&previous-version=4.3.0&new-version=4.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-08 03:53:45 -07:00
dependabot[bot] a0a434c185 chore: bump h2 from 4.3.0 to 4.4.1 in /libs/langchain_v1 (#39324)
Bumps [h2](https://github.com/python-hyper/h2) from 4.3.0 to 4.4.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/python-hyper/h2/blob/master/CHANGELOG.rst">h2's
changelog</a>.</em></p>
<blockquote>
<h2>4.4.1 (2026-08-03)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Performance improvement: remove consumed frames in-place from data
buffer.</li>
<li>Reject duplicate Host headers in request headers. Thanks to Sunand
Mohan for the report.</li>
</ul>
<h2>4.4.0 (2026-07-23)</h2>
<p><strong>API Changes (Backward Incompatible)</strong></p>
<ul>
<li>Support for Python 3.9 has been removed.</li>
<li>Support for PyPy 3.9 has been removed.</li>
<li><code>Stream.end_stream()</code> now raises
<code>NoSuchStreamError</code> or <code>StreamClosedError</code>
exceptions, instead of a generic <code>KeyError</code>.</li>
<li>Duplicate <code>content-length</code> headers with different values
now raise <code>ProtocolError</code>.
Previously, the first <code>content-length</code> header was accepted
and later conflicting values were ignored. Thanks to Harshal Parekh for
the report.</li>
<li>Parse <code>content-length</code> headers according to RFC9110
grammar for numbers (1*DIGIT). Thanks to Arkadiusz Marta for the
report.</li>
<li><strong>backfill from v4.3.0</strong> Convert emitted events into
Python <code>dataclass</code>, which introduces new constructors with
required arguments.
Instantiating these events without arguments, as previously commonly
used API pattern, will no longer work.</li>
</ul>
<p><strong>API Changes (Backward Compatible)</strong></p>
<ul>
<li>Support for Python 3.14 has been added.</li>
<li><code>H2Connection.receive_data</code> now accepts any byte-like
object that
implements the buffer protocol, such as <code>bytes</code>,
<code>bytearray</code>, and
<code>memoryview</code>. Existing <code>bytes</code> callers are
unaffected.</li>
<li>Align CONNECT pseudo-header validation with RFC 9113 s8.3 and RFC
8441 s4.
Ordinary CONNECT now requires <code>:method=CONNECT</code> and
<code>:authority</code>, and
forbids <code>:scheme</code>/<code>:path</code>. Extended CONNECT (e.g.,
WebSocket) requires
<code>:scheme</code>, <code>:path</code>, <code>:authority</code> plus
<code>:protocol</code>. (PR <a
href="https://redirect.github.com/python-hyper/h2/issues/1309">#1309</a>)</li>
<li>Fix incorrect substring matching of secure header in
<code>cookie</code> and <code>:method</code>.</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fix to allow sending 0 bytes on a stream even if the flow control
window is negative.</li>
<li>Reject non-zero <code>SETTINGS_ENABLE_PUSH</code> values received
from servers.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/python-hyper/h2/commit/bc239af1d1b85bc70482804f30a0e0e587d90a08"><code>bc239af</code></a>
v4.4.1</li>
<li><a
href="https://github.com/python-hyper/h2/commit/92b925ed1b1817c82db32893503f74f47fcf4452"><code>92b925e</code></a>
add test for duplicate host headers</li>
<li><a
href="https://github.com/python-hyper/h2/commit/292a40829feefda98c8509dcdbbb4a57af9bd6a6"><code>292a408</code></a>
reject duplicate Host headers in request headers</li>
<li><a
href="https://github.com/python-hyper/h2/commit/04d3b87cbc1db020d28c7cfb44fe194558efbdde"><code>04d3b87</code></a>
update changelog</li>
<li><a
href="https://github.com/python-hyper/h2/commit/439b970d0fa19891fa81068907de97dfa3a07c3a"><code>439b970</code></a>
prepare for next release cycle</li>
<li><a
href="https://github.com/python-hyper/h2/commit/9a7ff7430df669fa8e90b6121f3cc1ed64d1115a"><code>9a7ff74</code></a>
performance: remove consumed frames in place from data buffer (<a
href="https://redirect.github.com/python-hyper/h2/issues/1321">#1321</a>)</li>
<li><a
href="https://github.com/python-hyper/h2/commit/6cce763997eca5b826f3e435a611b7a7fc73f633"><code>6cce763</code></a>
v4.4.0</li>
<li><a
href="https://github.com/python-hyper/h2/commit/dfafda3b0cd96455b45d1785ef1ebc6968bba5cf"><code>dfafda3</code></a>
Bump pytest from 8.4.2 to 9.0.3 (<a
href="https://redirect.github.com/python-hyper/h2/issues/1320">#1320</a>)</li>
<li><a
href="https://github.com/python-hyper/h2/commit/b45207cedf9fabe2c77bb3c1c10f403a610599a0"><code>b45207c</code></a>
dependencies and packaging++</li>
<li><a
href="https://github.com/python-hyper/h2/commit/c40145f69c5473850849fe96301ac0416b1afea6"><code>c40145f</code></a>
parse <code>content-length</code> headers according to RFC9110 grammar
for numbers (1*DI...</li>
<li>Additional commits viewable in <a
href="https://github.com/python-hyper/h2/compare/v4.3.0...v4.4.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=h2&package-manager=uv&previous-version=4.3.0&new-version=4.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-08 03:53:38 -07:00
Soban Shankar c318abed44 fix(text-splitters): raise TypeError for non-dict, non-convertible input to RecursiveJsonSplitter (#39238) 2026-08-07 22:29:49 -04:00
幻andJony 1499aa9900 fix(core): stop StructuredPrompt from mutating caller kwargs (#39174)
Co-authored-by: Jony <13896935+zyz619963502zyz@users.noreply.github.com>
2026-08-07 22:20:14 -04:00
Nishitha Mandshusnapx 0424e03dc7 fix(core): preserve flat tool args schema for RootModel runnables (#39307)
Closes #38713

Fixes `Runnable.as_tool()` advertising `TypedDict` inputs under a
synthetic `root` key.

When a runnable's `input_schema` is a `RootModel` (e.g. compiled
`StateGraph`s), the tool schema is now built from the runnable's type
hints instead, keeping the advertised schema consistent with the flat
input the runnable actually expects.

---------

Co-authored-by: shusnapx <ashu.kumarexam@gmail.com>
2026-08-07 14:22:15 -04:00
Nishitha M bc16168d71 fix(langchain): preserve history on SummarizationMiddleware summary failure (#39268)
Closes #38867

Fixes `SummarizationMiddleware` replacing conversation history with
error text when summary generation fails.

Summary calls now retry transient failures up to 3 times via
`Runnable.with_retry`. If all attempts fail, the underlying exception
propagates and the original history remains untouched.

`_create_summary`/`_acreate_summary` no longer convert exceptions into
fabricated summaries. No new parameters or exception types are
introduced.

### Release note
`SummarizationMiddleware` now retries failed summary calls and
propagates the underlying error if retries are exhausted, instead of
replacing conversation history with error text.

Thanks @harshxth for raising this!

---------

Signed-off-by: Nishitha M <32355027+imnishitha@users.noreply.github.com>
2026-08-07 14:20:15 -04:00
langchain-oss-model-profiles[bot]andmdrxy 44ae55a186 chore(model-profiles): refresh model profile data (#39318)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the [`refresh_model_profiles`
workflow](https://github.com/langchain-ai/langchain/blob/master/.github/workflows/refresh_model_profiles.yml).

## Summary of changes

**1 added · 1 removed · 6 changed** across 1 provider(s).

### openrouter

**➕ 1 added**
- `inclusionai/ling-3.0-tiny:free` — 262,144 ctx, 32,768 out, reasoning,
tools

**➖ 1 removed**
- `inclusionai/ling-3.0-flash:free`

**✏️ 6 changed**
- `anthropic/claude-opus-4.1`: removed structured output
- `google/gemini-3-flash-preview`: max output tokens 65,535 → 65,536
- `inclusionai/ling-3.0-flash`: max input tokens 131,072 → 262,144; max
output tokens 16,384 → 32,768
- `qwen/qwen3-coder-next`: last updated `2026-02-04` → `2026-02-03`;
release date `2026-02-04` → `2026-02-03`
- `qwen/qwen3.5-122b-a10b`: max output tokens 65,536 → 81,920
- `z-ai/glm-5.2`: max output tokens 262,144 → 131,072

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-08-07 10:28:44 -07:00
dependabot[bot] b6bce1a943 chore: bump h2 from 4.3.0 to 4.4.1 in /libs/partners/qdrant (#39323)
Bumps [h2](https://github.com/python-hyper/h2) from 4.3.0 to 4.4.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/python-hyper/h2/blob/master/CHANGELOG.rst">h2's
changelog</a>.</em></p>
<blockquote>
<h2>4.4.1 (2026-08-03)</h2>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Performance improvement: remove consumed frames in-place from data
buffer.</li>
<li>Reject duplicate Host headers in request headers. Thanks to Sunand
Mohan for the report.</li>
</ul>
<h2>4.4.0 (2026-07-23)</h2>
<p><strong>API Changes (Backward Incompatible)</strong></p>
<ul>
<li>Support for Python 3.9 has been removed.</li>
<li>Support for PyPy 3.9 has been removed.</li>
<li><code>Stream.end_stream()</code> now raises
<code>NoSuchStreamError</code> or <code>StreamClosedError</code>
exceptions, instead of a generic <code>KeyError</code>.</li>
<li>Duplicate <code>content-length</code> headers with different values
now raise <code>ProtocolError</code>.
Previously, the first <code>content-length</code> header was accepted
and later conflicting values were ignored. Thanks to Harshal Parekh for
the report.</li>
<li>Parse <code>content-length</code> headers according to RFC9110
grammar for numbers (1*DIGIT). Thanks to Arkadiusz Marta for the
report.</li>
<li><strong>backfill from v4.3.0</strong> Convert emitted events into
Python <code>dataclass</code>, which introduces new constructors with
required arguments.
Instantiating these events without arguments, as previously commonly
used API pattern, will no longer work.</li>
</ul>
<p><strong>API Changes (Backward Compatible)</strong></p>
<ul>
<li>Support for Python 3.14 has been added.</li>
<li><code>H2Connection.receive_data</code> now accepts any byte-like
object that
implements the buffer protocol, such as <code>bytes</code>,
<code>bytearray</code>, and
<code>memoryview</code>. Existing <code>bytes</code> callers are
unaffected.</li>
<li>Align CONNECT pseudo-header validation with RFC 9113 s8.3 and RFC
8441 s4.
Ordinary CONNECT now requires <code>:method=CONNECT</code> and
<code>:authority</code>, and
forbids <code>:scheme</code>/<code>:path</code>. Extended CONNECT (e.g.,
WebSocket) requires
<code>:scheme</code>, <code>:path</code>, <code>:authority</code> plus
<code>:protocol</code>. (PR <a
href="https://redirect.github.com/python-hyper/h2/issues/1309">#1309</a>)</li>
<li>Fix incorrect substring matching of secure header in
<code>cookie</code> and <code>:method</code>.</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fix to allow sending 0 bytes on a stream even if the flow control
window is negative.</li>
<li>Reject non-zero <code>SETTINGS_ENABLE_PUSH</code> values received
from servers.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/python-hyper/h2/commit/bc239af1d1b85bc70482804f30a0e0e587d90a08"><code>bc239af</code></a>
v4.4.1</li>
<li><a
href="https://github.com/python-hyper/h2/commit/92b925ed1b1817c82db32893503f74f47fcf4452"><code>92b925e</code></a>
add test for duplicate host headers</li>
<li><a
href="https://github.com/python-hyper/h2/commit/292a40829feefda98c8509dcdbbb4a57af9bd6a6"><code>292a408</code></a>
reject duplicate Host headers in request headers</li>
<li><a
href="https://github.com/python-hyper/h2/commit/04d3b87cbc1db020d28c7cfb44fe194558efbdde"><code>04d3b87</code></a>
update changelog</li>
<li><a
href="https://github.com/python-hyper/h2/commit/439b970d0fa19891fa81068907de97dfa3a07c3a"><code>439b970</code></a>
prepare for next release cycle</li>
<li><a
href="https://github.com/python-hyper/h2/commit/9a7ff7430df669fa8e90b6121f3cc1ed64d1115a"><code>9a7ff74</code></a>
performance: remove consumed frames in place from data buffer (<a
href="https://redirect.github.com/python-hyper/h2/issues/1321">#1321</a>)</li>
<li><a
href="https://github.com/python-hyper/h2/commit/6cce763997eca5b826f3e435a611b7a7fc73f633"><code>6cce763</code></a>
v4.4.0</li>
<li><a
href="https://github.com/python-hyper/h2/commit/dfafda3b0cd96455b45d1785ef1ebc6968bba5cf"><code>dfafda3</code></a>
Bump pytest from 8.4.2 to 9.0.3 (<a
href="https://redirect.github.com/python-hyper/h2/issues/1320">#1320</a>)</li>
<li><a
href="https://github.com/python-hyper/h2/commit/b45207cedf9fabe2c77bb3c1c10f403a610599a0"><code>b45207c</code></a>
dependencies and packaging++</li>
<li><a
href="https://github.com/python-hyper/h2/commit/c40145f69c5473850849fe96301ac0416b1afea6"><code>c40145f</code></a>
parse <code>content-length</code> headers according to RFC9110 grammar
for numbers (1*DI...</li>
<li>Additional commits viewable in <a
href="https://github.com/python-hyper/h2/compare/v4.3.0...v4.4.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=h2&package-manager=uv&previous-version=4.3.0&new-version=4.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-07 10:25:16 -07:00
Nishitha MandLincolnBurrows2017 536ce56f4e fix(anthropic): fix KeyError on rename in Claude file-tool middleware (#39293)
Closes #35852, #38465

The `file_tool` dispatcher builds the operation arguments using `"path"`
as the source path for all commands, including `rename`. However,
`_handle_rename` was the only handler reading `args["old_path"]` instead
of `args["path"]`, resulting in a `KeyError` on every rename across all
Claude file/memory tool middleware classes.

The fix makes `_handle_rename` read the source path from `args["path"]`,
matching the dispatcher's behavior and keeping rename consistent with
every other file operation.

Claude adapts to the advertised tool schema: it initially emits the
documented [Memory Tool rename payload
](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool#rename)(`old_path/new_path`),
but after receiving a validation error because path is required by this
tool, it retries with both path and old_path. Since the dispatcher
already normalizes the source path under path, the simplest and most
consistent fix is for `_handle_rename `to read `args["path"]`, matching
every other handler and the dispatcher itself.
Otherwise making `path` as an optional arg in the tool would be a
breaking change.

Co-authored-by: LincolnBurrows2017 <lincolnburrows2017@gmail.com>
2026-08-07 13:22:50 -04:00
Ali Satwat Khan d616af71dd fix(exa): handle missing optional result metadata (#39171) 2026-08-07 10:28:14 -04:00
Kellampalli Saathvik 2f4aa5a79c feat(openrouter): preserve provider in response metadata (#39301) 2026-08-07 10:02:52 -04:00
ccurme 367df8e3d9 chore(openai): update guidance for responses API for OpenAI-compatible providers (#39327) 2026-08-07 10:00:45 -04:00
Nishitha Mandkeenborder786 a4fb5f1a7a fix(langchain): handle import error in LLMToolEmulator by model (#39290)
Closes #34274

- Removed the redundant double-check (`not self.emulate_all and tools is
not None`) when building `tools_to_emulate`.
- The middleware now: raises an actionable `ImportError` when
`langchain-anthropic` isn't installed and emits a `DeprecationWarning`
either way, so callers have a real migration window before model becomes
required in a future release.

### Release notes
`model` will be made required param in the future relase

---------

Co-authored-by: keenborder786 <21110290@lums.edu.pk>
2026-08-07 13:48:12 +00:00