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)
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
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>
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`.
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 />
[](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>
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 />
[](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>
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>
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>
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 />
[](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>
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>
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>