Introduce Valkey Vector Store for LangChain AWS#1
Conversation
…ai#845) to follow the convention that only reusable workflows (those with `workflow_call` triggers) have a leading underscore
… instead of remove dangling tool_calls (langchain-ai#842) Fixes langchain-ai#837 ### Context: Addressing the follow up item listed in [this comment](langchain-ai#725 (comment)) from PR langchain-ai#725, the context for which can be found [here](langchain-ai#837 (comment)). When a checkpoint is saved during tool execution, this may result in an `AIMessage` with `tool_calls` and no corresponding `ToolMessage`, which would normally cause Bedrock to throw a `ValidationException` upon resumption from the checkpoint. Currently, `AgentCoreMemorySaver` safeguards against these Bedrock `ValidationException`s related to dangling `tool_calls` by removing them from the `AIMessage`. However, this is not ideal, given that we lose awareness of the tool call attempt from the previous conversation state. ### Solution: This PR updates the default behavior of `AgentCoreMemorySaver` to instead append a dummy `ToolMessage` for each dangling `tool_calls`, and preserve the original tool calls. For example, with the following dangling tool calls: ```python messages = [ HumanMessage(content="What's the weather in SF?"), AIMessage( content="", tool_calls=[ {"id": "call_abc123", "name": "get_weather", "args": {"city": "SF"}} ] ), ] ``` The old handler (removal) would produce the following output: ```python result = [ HumanMessage(content="What's the weather in SF?"), AIMessage( content="", tool_calls=[] # tool_call removed! ), ] ``` While the new handler (patching) will instead generate: ```python result = [ HumanMessage(content="What's the weather in SF?"), AIMessage( content="", tool_calls=[ {"id": "call_abc123", "name": "get_weather", "args": {"city": "SF"}} ] ), ToolMessage( content="Tool call 'get_weather' with id 'call_abc123' was interrupted before completion.", name="get_weather", tool_call_id="call_abc123", status="error" ), ] ```
MatthiasHowellYopp
left a comment
There was a problem hiding this comment.
Minor questions - basically looks good.
…ool_calls when no Langchain interrupts have been detected (langchain-ai#848) Fixes langchain-ai#847 When working with LangGraph interrupts (human-in-the-loop workflows), checkpoints can be saved with intentionally incomplete tool calls that are waiting for human approval or intervention. The existing `build_checkpoint_tuple` function was unconditionally calling `patch_orphan_tool_calls()`, which would add placeholder error messages for these incomplete tool calls.
94672a2 to
456c553
Compare
456c553 to
07e6ebf
Compare
langchain-ai#854) Fixes langchain-ai#853 Updates ChatBedrockConverse to address a regression present in langchain-aws>=1.2.1. langchain-ai#784 included a change to `bind_tools()` removing formatting of base/custom tools from `StructuredTool` to OpenAI (dictionary) format when no Nova 2.0 system tools were present, which broke compatibility with `create_agent` and the older LangGraph `create_react_agent`.
The package works fine in any version of numpy (>1,<3). Restricting to >2.2 for py3.12 and above means folks still using numpy v1 will face conflict with this package for no technical reason ( :( still using numpy v1, but i suspect I am not alone) Note that without this specifier, package resolution is still bounded by numpy supported versions as declared in numpy's `requires_python` tags. As such, this change should: 1. not change any dependency resolution for projects which already (or can use) numpy v2 2. not unduly pull in numpy v2 in python versions which cant support it 3. enable folks to use this package when using py3.12/numpy@v1 Should this package actually come to use or rely on numpy@v2 functionality, then makes sense to bump this. But for now seems this may as well loosen, if possible to be more permissive. ``` $ uv venv --python 3.13 --clear && uv pip install . && (uv pip freeze | grep numpy) Using CPython 3.13.8 numpy==2.4.2 $ uv venv --python 3.12 --clear && uv pip install . && (uv pip freeze | grep numpy) Using CPython 3.12.10 numpy==2.4.2 $ uv venv --python 3.11 --clear && uv pip install . && (uv pip freeze | grep numpy) Using CPython 3.11.14 interpreter at: /usr/bin/python3.11 numpy==2.4.2 $ uv venv --python 3.10 --clear && uv pip install . && (uv pip freeze | grep numpy) Using CPython 3.10.18 numpy==2.2.6 ``` so we use v2 unless specifically requestes ``` uv venv --python 3.12 --clear && uv pip install . numpy==1.26.4 numpy==1.26.4 ``` Followed https://docs.langchain.com/oss/python/contributing/code#submitting-your-pr, but don't have a related issue. I can open one if there is interest in this change. Thanks so much for the project!
…aging for this directory
…rnings (langchain-ai#858) Fixes langchain-ai#856 Wrap stream iteration in `try/finally` to explicitly close `EventStream`/`StreamingBody` after use, preventing `ValueError: I/O operation on closed file` warnings during garbage collection. - `ChatBedrockConverse._stream`: close `response["stream"]` after iteration - `BedrockLLM._prepare_input_and_invoke_stream`: close `response.get("body")` after iteration --------- Co-authored-by: midodimori <midodimori@users.noreply.github.com> Co-authored-by: Michael Chin <mchin188@yahoo.com>
Add workflow-level permissions following the principle of least privilege. Remove unnecessary `actions: write` from lint, test, and compile workflows that don't use artifacts. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…actions-dependencies group (langchain-ai#864) Bumps the actions-dependencies group with 1 update: [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials). Updates `aws-actions/configure-aws-credentials` from 5 to 6 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/aws-actions/configure-aws-credentials/releases">aws-actions/configure-aws-credentials's releases</a>.</em></p> <blockquote> <h2>v6.0.0</h2> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.1.1...v6.0.0">6.0.0</a> (2026-02-04)</h2> <h3>⚠ BREAKING CHANGES</h3> <ul> <li>Update action to use node24 <em>Note this requires GitHub action runner version <a href="https://github.com/actions/runner/releases/tag/v2.327.1">v2.327.1</a> or later</em> (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1632">#1632</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/a7a2c1125c67f40a1e95768f4e4a7d8f019f87af">a7a2c11</a>)</li> </ul> <h3>Features</h3> <ul> <li>add support to define transitive tag keys (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1316">#1316</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/232435c0c05e51137544f0203931b84893d13b74">232435c</a>) (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1628/changes/930ebd9bcaed959c3ba9e21567e8abbc3cae72c0">930ebd9</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li>properly output <code>aws-account-id</code> and <code>authenticated-arn</code> when using role-chaining (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1633">#1633</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/7ceaf96edc86cc1713cef59eba79feeb23f59da1">7ceaf96</a>)</li> </ul> <h2>v5.1.1</h2> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.1.0...v5.1.1">5.1.1</a> (2025-11-24)</h2> <h3>Miscellaneous Chores</h3> <ul> <li>release 5.1.1 (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/56d6a583f00f6bad6d19d91d53a7bc3b8143d0e9">56d6a58</a>)</li> <li>various dependency updates</li> </ul> <h2>v5.1.0</h2> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.0.0...v5.1.0">5.1.0</a> (2025-10-06)</h2> <h3>Features</h3> <ul> <li>Add global timeout support (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1487">#1487</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/1584b8b0e2062557287c28fbe9b8920df434e866">1584b8b</a>)</li> <li>add no-proxy support (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1482">#1482</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/dde9b22a8e889a0821997a21a2c5a38020ee8de3">dde9b22</a>)</li> <li>Improve debug logging in retry logic (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1485">#1485</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/97ef425d73aa532439f54f90d0e83101a186c5a6">97ef425</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li>properly expose getProxyForUrl (introduced in <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1482">#1482</a>) (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1486">#1486</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/cea42985ac88b42678fbc84c18066a7f07f05176">cea4298</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md">aws-actions/configure-aws-credentials's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.0.0...v5.1.0">5.1.0</a> (2025-10-06)</h2> <h3>Features</h3> <ul> <li>Add global timeout support (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1487">#1487</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/1584b8b0e2062557287c28fbe9b8920df434e866">1584b8b</a>)</li> <li>add no-proxy support (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1482">#1482</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/dde9b22a8e889a0821997a21a2c5a38020ee8de3">dde9b22</a>)</li> <li>Improve debug logging in retry logic (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1485">#1485</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/97ef425d73aa532439f54f90d0e83101a186c5a6">97ef425</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li>properly expose getProxyForUrl (introduced in <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1482">#1482</a>) (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1486">#1486</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/cea42985ac88b42678fbc84c18066a7f07f05176">cea4298</a>)</li> </ul> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.3.1...v5.0.0">5.0.0</a> (2025-09-03)</h2> <h3>⚠ BREAKING CHANGES</h3> <ul> <li>Cleanup input handling. Changes invalid boolean input behavior (see <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1445">#1445</a>)</li> </ul> <h3>Features</h3> <ul> <li>add skip OIDC option (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1458">#1458</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/8c45f6b08196feb86cfdbe431541d5571d9ab2c2">8c45f6b</a>)</li> <li>Cleanup input handling. Changes invalid boolean input behavior (see <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1445">#1445</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/74b3e27aa80db064b5bb8c04b22fc607e817acf7">74b3e27</a>)</li> <li>support account id allowlist (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1456">#1456</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/c4be498953fc1da2707a50ce4b761a53af3d02af">c4be498</a>)</li> </ul> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.3.0...v4.3.1">4.3.1</a> (2025-08-04)</h2> <h3>Bug Fixes</h3> <ul> <li>update readme to 4.3.1 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1424">#1424</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/be2e7ad815e27b890489a89ce2717b0f9e26b56e">be2e7ad</a>)</li> </ul> <h2><a href="https://github.com/aws-actions/configure-aws-credentials/compare/v4.2.1...v4.3.0">4.3.0</a> (2025-08-04)</h2> <h3>Features</h3> <ul> <li>depenency update and feature cleanup (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1414">#1414</a>) (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/59489ba544930000b7b67412c167f5fe816568cf">59489ba</a>), closes <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1062">#1062</a> <a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1191">#1191</a></li> <li>Optional environment variable output (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/c3b3ce61b02510937ff02916a4eb153874bc5085">c3b3ce6</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>docs:</strong> readme samples versioning (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/5b3c89504689ea1ea2b6000b23a6a2aac463662a">5b3c895</a>)</li> <li>the wrong example region for China partition in README (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/37fe9a740bcb30ee8cccd96feb90666c937311f2">37fe9a7</a>)</li> <li>properly set proxy environment variable (<a href="https://github.com/aws-actions/configure-aws-credentials/commit/cbea70821e4ab985ad3be0e5a93390523e257cde">cbea708</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/8df5847569e6427dd6c4fb1cf565c83acfa8afa7"><code>8df5847</code></a> chore(deps): bump fast-xml-parser and <code>@aws-sdk/xml-builder</code> (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1640">#1640</a>)</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/d22a0f8af59e052e453e2f8fbe2b9cbbc1b76b15"><code>d22a0f8</code></a> chore(deps-dev): bump <code>@types/node</code> from 25.0.10 to 25.2.0 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1635">#1635</a>)</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/f7b8181755fc1413cd909cbac860d8a76dc848f1"><code>f7b8181</code></a> chore(main): release 6.0.0 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1641">#1641</a>)</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/c367a6acb003ce286b445638569d6ed8d9e846de"><code>c367a6a</code></a> chore: integ tests manual option (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1639">#1639</a>)</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/7ceaf96edc86cc1713cef59eba79feeb23f59da1"><code>7ceaf96</code></a> fix: correct outputs for role chaining (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1633">#1633</a>)</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/a7a2c1125c67f40a1e95768f4e4a7d8f019f87af"><code>a7a2c11</code></a> feat!: update action to use node24 (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1632">#1632</a>)</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/6e3375df071cb03cfbf5fa8ae7770ada6633ab7c"><code>6e3375d</code></a> chore: remove release-please release automation (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1631">#1631</a>)</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/98abed784138c9838ce602dfb51633e39a1a02b8"><code>98abed7</code></a> chore: add workflow_dispatch trigger to release workflow (<a href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1630">#1630</a>)</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/bf3adbbb948ac5c9b2dd90a5beecc537dab6ebbf"><code>bf3adbb</code></a> chore: Update dist</li> <li><a href="https://github.com/aws-actions/configure-aws-credentials/commit/db43b8b90ab5e82cf8affce23d07afc7837ae4b2"><code>db43b8b</code></a> chore: re-run linter</li> <li>Additional commits viewable in <a href="https://github.com/aws-actions/configure-aws-credentials/compare/v5...v6">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 <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…h 2 updates (langchain-ai#866) Updates the requirements on [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) and [types-requests](https://github.com/typeshed-internal/stub_uploader) to permit the latest version. Updates `pytest-asyncio` to 1.3.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's releases</a>.</em></p> <blockquote> <h2>pytest-asyncio 1.3.0</h2> <h1><a href="https://github.com/pytest-dev/pytest-asyncio/tree/1.3.0">1.3.0</a> - 2025-11-10</h1> <h2>Removed</h2> <ul> <li>Support for Python 3.9 (<a href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1278">#1278</a>)</li> </ul> <h2>Added</h2> <ul> <li>Support for pytest 9 (<a href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1279">#1279</a>)</li> </ul> <h2>Notes for Downstream Packagers</h2> <ul> <li>Tested Python versions include free threaded Python 3.14t (<a href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1274">#1274</a>)</li> <li>Tests are run in the same pytest process, instead of spawning a subprocess with <code>pytest.Pytester.runpytest_subprocess</code>. This prevents the test suite from accidentally using a system installation of pytest-asyncio, which could result in test errors. (<a href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1275">#1275</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/2e9695fcf8c5c514f30f57b7d14ab83846357b96"><code>2e9695f</code></a> docs: Compile changelog for v1.3.0</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/dd0e9ba3fa672fd6bf375004319742f8d3a50e12"><code>dd0e9ba</code></a> docs: Reference correct issue in news fragment.</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/4c31abe5bf46bca3c9bdc7b18405f3deba4145d0"><code>4c31abe</code></a> Build(deps): Bump nh3 from 0.3.1 to 0.3.2</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/13e94770d7bb146c329ae0e02486c0a6b38f3772"><code>13e9477</code></a> Link to migration guides from changelog</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/4d2cf3c36f47d7c4d563d401cdf229b35da34fbe"><code>4d2cf3c</code></a> tests: handle Python 3.14 DefaultEventLoopPolicy deprecation warnings</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/ee3549b6efb729b934e370e2be8040b25b034010"><code>ee3549b</code></a> test: Remove obsolete test for the event_loop fixture.</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/7a67c82c5ae548f0968438e9dfa0f282d51c4597"><code>7a67c82</code></a> tests: Fix failing test by preventing warning conversion to error.</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/a17b689a750d05b6fc9369f5fb2b06baaba83536"><code>a17b689</code></a> test: add pytest config to isolated test directories</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/18afc9df5a3153dc1fbdc4e11a56517ef95480df"><code>18afc9d</code></a> fix(tests): replace runpytest_subprocess with runpytest</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/cdc6bd1de75b4738289eafd546f5e27a0bfd3b41"><code>cdc6bd1</code></a> Add support for pytest 9 and drop Python 3.9 support</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.20.0...v1.3.0">compare view</a></li> </ul> </details> <br /> Updates `types-requests` to 2.32.4.20260107 <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/typeshed-internal/stub_uploader/commits">compare view</a></li> </ul> </details> <br /> 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 <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
… >=3.0.0,<5.0.0 in /libs/langgraph-checkpoint-aws in the production-dependencies group across 1 directory (langchain-ai#865) 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 <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…xing for AmazonS3Vectors (langchain-ai#857) **Issue:** langchain-ai#814 **Motivation:** Support correct usage of Gemini API for embeddings. **Description:** Add an optional init arg `query_embedding` to the `AmazonS3Vectors` type. If provided, use it for embedding queries. Otherwise, default to using the `embedding` arg. `embedding` is always used for document indexing. **No new dependencies and No breaking changes.** --------- Co-authored-by: Michael Chin <mchin188@yahoo.com>
…#849) Related: langchain-ai#841 This PR adds a new `bedrock_api_key`(or just `api_key`) parameter to ChatBedrock and ChatBedrockConverse, allowing for [Bedrock API keys](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html) to be passed explicitly during model instantiation. This parameter follows the equivalent `api_key` implementations in [ChatAnthropic](https://github.com/langchain-ai/langchain/blob/72571185a8f51e353a2fe9143855f310c4d31e08/libs/partners/anthropic/langchain_anthropic/chat_models.py#L804) and [ChatOpenAI](https://reference.langchain.com/python/integrations/langchain_openai/ChatOpenAI/#langchain_openai.ChatOpenAI.openai_api_key). Usage example: ```python API_KEY = "your_api_key_here" llm = ChatBedrockConverse( model="global.anthropic.claude-sonnet-4-5-20250929-v1:0", region_name="us-west-2", bedrock_api_key=API_KEY ) ``` A few notes: - If `bedrock_api_key` is not specified, it will pick up the value of the `AWS_BEARER_TOKEN_BEDROCK` environmental variable, if present. (This is the existing default behavior.) - If `bedrock_api_key` is specified AND `AWS_BEARER_TOKEN_BEDROCK` exist, the env variable will be overwritten with the value of `bedrock_api_key`. - If both `bedrock_api_key` and AWS credentials are passed during model instantiation, the API key will take precedence.
langchain-ai#870) - Text content blocks from `langchain-mcp-adapters` include an `id` field (auto-generated by `create_text_block()` in langchain-core). When these blocks appear inside `tool_result` content in `ChatBedrock`, they pass through to the Bedrock API unfiltered, causing validation errors since `id` is not an expected field on text content blocks in the request payload. - Filter text blocks inside `tool_result` content to only allowed keys - `ChatBedrockConverse` is not affected — `_lc_content_to_bedrock` already reconstructs text blocks with only `{"text": block["text"]}`.
…delete_thread (langchain-ai#877) Related: langchain-ai#873 and langchain-ai#874 As is, ValkeySaver's `_make_thread_key` method explicitly wraps `thread_id` in curly braces for Valkey hash slot routing ([code ref](https://github.com/langchain-ai/langchain-aws/blob/e5fd18387ab28e00748ca177ee3244223e84fe51/libs/langgraph-checkpoint-aws/langgraph_checkpoint_aws/checkpoint/valkey/base.py#L74)): ```python # base.py — key stored as "thread:{test-thread}:ns1" return f"thread:{{{thread_id}}}:{checkpoint_ns}" ``` However, `delete_thread` searches for keys without the braces properly escaped in the f-string ([code ref](https://github.com/langchain-ai/langchain-aws/blob/e5fd18387ab28e00748ca177ee3244223e84fe51/libs/langgraph-checkpoint-aws/langgraph_checkpoint_aws/checkpoint/valkey/saver.py#L527)): ```python pattern = f"thread:{thread_id}:*" ``` So delete_thread silently deletes nothing. Fixing this for both ValkeySaver's and AsyncValkeySaver's `delete_thread` methods.
…sts for consistency (langchain-ai#874) This PR updates the unit tests for checkpoint key generation in the Valkey checkpoint saver, ensuring that thread IDs are wrapped in curly braces in generated keys. This change aligns the test expectations with the updated key formatting logic. * Added `--extra valkey` to the test commands in the `Makefile` to ensure Valkey dependencies are included when running tests. issue: langchain-ai#873 --------- Co-authored-by: Michael Chin <mchin188@yahoo.com>
Discovered in langchain-ai/deepagents#917 --- - Unwraps `non_standard` content blocks in `_lc_content_to_bedrock` so provider-specific blocks survive round-tripping through `content_blocks`.
…hain-ai#876) Support properly recreating parameters from a trace. --------- Co-authored-by: Mason Daugherty <mason@langchain.dev> Co-authored-by: Mason Daugherty <github@mdrxy.com>
…n-ai#878) Bumps the uv group with 1 update in the /libs/aws directory: [langchain-core](https://github.com/langchain-ai/langchain). Bumps the uv group with 1 update in the /libs/langgraph-checkpoint-aws directory: [langchain-core](https://github.com/langchain-ai/langchain). Updates `langchain-core` from 1.2.9 to 1.2.11 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/langchain-ai/langchain/releases">langchain-core's releases</a>.</em></p> <blockquote> <h2>langchain-core==1.2.11</h2> <p>Changes since langchain-core==1.2.10</p> <p>release(core): 1.2.11 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35144">#35144</a>) fix(openai): sanitize urls when counting tokens in images (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35143">#35143</a>) chore(core): clean up docstring mismatch and redundant logic in langchain-core (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35064">#35064</a>) fix(core): replace bare except with Exception in tracer (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35138">#35138</a>)</p> <h2>langchain-core==1.2.10</h2> <p>Changes since langchain-core==1.2.9</p> <p>release(core): 1.2.10 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35136">#35136</a>) chore(deps): bump the langchain-deps group across 3 directories with 40 updates (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35129">#35129</a>) chore(deps): bump the langchain-deps group across 3 directories with 11 updates (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35121">#35121</a>) feat(core): add ContextOverflowError, raise in anthropic and openai (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35099">#35099</a>) feat(model-profiles): add <code>text_inputs</code> and <code>text_outputs</code> (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35084">#35084</a>) feat(core): count tokens from tool schemas in <code>count_tokens_approximately</code> (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35098">#35098</a>) docs(core): add missing <code>name</code> docstring for <code>RunnableSerializable</code> (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35088">#35088</a>)</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/langchain-ai/langchain/commit/524e1dab5e7c8229bd78be3c13ab38ac93a6216b"><code>524e1da</code></a> release(core): 1.2.11 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35144">#35144</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/2b4b1dc29a833d4053deba4c2b77a3848c834565"><code>2b4b1dc</code></a> fix(openai): sanitize urls when counting tokens in images (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35143">#35143</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/0493b276e0be31d4f48d9d0ba5fcbce7fdded38f"><code>0493b27</code></a> fix(anthropic): support effort="max" and remove beta headers (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35141">#35141</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/a5f22e7cb18a05ed057028797a7d0d79cd509b0d"><code>a5f22e7</code></a> chore(core): clean up docstring mismatch and redundant logic in langchain-cor...</li> <li><a href="https://github.com/langchain-ai/langchain/commit/97ee14c179f703473a6ec6ee24179ea756a5698f"><code>97ee14c</code></a> fix(core): replace bare except with Exception in tracer (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35138">#35138</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/990e8076e1d61a0c8ced4d83607685bd71e23687"><code>990e807</code></a> release(standard-tests): release 1.1.5 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35139">#35139</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/74dffca3d89effdb62da567d1ff6d160c9ad5354"><code>74dffca</code></a> release(langchain): 1.2.10 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35137">#35137</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/f41e0493336698e9a3e25e6e238786dfc8af91ba"><code>f41e049</code></a> release(core): 1.2.10 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35136">#35136</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/de05838fca46eb6c2f67064da3a59f5e84818e9a"><code>de05838</code></a> chore(deps): bump the langchain-deps group across 3 directories with 40 updat...</li> <li><a href="https://github.com/langchain-ai/langchain/commit/d6e86aa748ae173857732ee1f7114a06ff8f4231"><code>d6e86aa</code></a> chore(deps): bump the other-deps group across 3 directories with 12 updates (...</li> <li>Additional commits viewable in <a href="https://github.com/langchain-ai/langchain/compare/langchain-core==1.2.9...langchain-core==1.2.11">compare view</a></li> </ul> </details> <br /> Updates `langchain-core` from 1.2.7 to 1.2.11 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/langchain-ai/langchain/releases">langchain-core's releases</a>.</em></p> <blockquote> <h2>langchain-core==1.2.11</h2> <p>Changes since langchain-core==1.2.10</p> <p>release(core): 1.2.11 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35144">#35144</a>) fix(openai): sanitize urls when counting tokens in images (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35143">#35143</a>) chore(core): clean up docstring mismatch and redundant logic in langchain-core (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35064">#35064</a>) fix(core): replace bare except with Exception in tracer (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35138">#35138</a>)</p> <h2>langchain-core==1.2.10</h2> <p>Changes since langchain-core==1.2.9</p> <p>release(core): 1.2.10 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35136">#35136</a>) chore(deps): bump the langchain-deps group across 3 directories with 40 updates (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35129">#35129</a>) chore(deps): bump the langchain-deps group across 3 directories with 11 updates (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35121">#35121</a>) feat(core): add ContextOverflowError, raise in anthropic and openai (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35099">#35099</a>) feat(model-profiles): add <code>text_inputs</code> and <code>text_outputs</code> (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35084">#35084</a>) feat(core): count tokens from tool schemas in <code>count_tokens_approximately</code> (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35098">#35098</a>) docs(core): add missing <code>name</code> docstring for <code>RunnableSerializable</code> (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35088">#35088</a>)</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/langchain-ai/langchain/commit/524e1dab5e7c8229bd78be3c13ab38ac93a6216b"><code>524e1da</code></a> release(core): 1.2.11 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35144">#35144</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/2b4b1dc29a833d4053deba4c2b77a3848c834565"><code>2b4b1dc</code></a> fix(openai): sanitize urls when counting tokens in images (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35143">#35143</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/0493b276e0be31d4f48d9d0ba5fcbce7fdded38f"><code>0493b27</code></a> fix(anthropic): support effort="max" and remove beta headers (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35141">#35141</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/a5f22e7cb18a05ed057028797a7d0d79cd509b0d"><code>a5f22e7</code></a> chore(core): clean up docstring mismatch and redundant logic in langchain-cor...</li> <li><a href="https://github.com/langchain-ai/langchain/commit/97ee14c179f703473a6ec6ee24179ea756a5698f"><code>97ee14c</code></a> fix(core): replace bare except with Exception in tracer (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35138">#35138</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/990e8076e1d61a0c8ced4d83607685bd71e23687"><code>990e807</code></a> release(standard-tests): release 1.1.5 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35139">#35139</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/74dffca3d89effdb62da567d1ff6d160c9ad5354"><code>74dffca</code></a> release(langchain): 1.2.10 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35137">#35137</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/f41e0493336698e9a3e25e6e238786dfc8af91ba"><code>f41e049</code></a> release(core): 1.2.10 (<a href="https://redirect.github.com/langchain-ai/langchain/issues/35136">#35136</a>)</li> <li><a href="https://github.com/langchain-ai/langchain/commit/de05838fca46eb6c2f67064da3a59f5e84818e9a"><code>de05838</code></a> chore(deps): bump the langchain-deps group across 3 directories with 40 updat...</li> <li><a href="https://github.com/langchain-ai/langchain/commit/d6e86aa748ae173857732ee1f7114a06ff8f4231"><code>d6e86aa</code></a> chore(deps): bump the other-deps group across 3 directories with 12 updates (...</li> <li>Additional commits viewable in <a href="https://github.com/langchain-ai/langchain/compare/langchain-core==1.2.9...langchain-core==1.2.11">compare view</a></li> </ul> </details> <br /> 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 <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/langchain-ai/langchain-aws/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
You need to move this out of draft so we can do proper code reviews on it. |
Code Review: Valkey Vector Store IntegrationThanks for this contribution! I've reviewed the PR against the AGENTS.md guidelines and general code quality standards. The implementation is solid overall, but there are several critical issues that need to be addressed before this can be merged. Critical Issues (Must Fix)1.
|
…ith_structured_output` (langchain-ai#862) Fixes langchain-ai#861 Brings the behavior of `ChatBedrock`'s `with_structured_output()` method in line with `ChatBedrockConverse` and `ChatAnthropic` when handling attempted forced tool usage with thinking enabled.
…ument embedding (langchain-ai#881) Issue: langchain-ai#867 Changes: **No breaking changes.** - One-liner fix. - Add unit test insuring the model invocation is performed with the right arguments. --------- Co-authored-by: Michael Chin <mchin188@yahoo.com>
9d24094 to
5e9e3ad
Compare
This PR provides a DynamoDB-backed store implementation for LangGraph, enabling persistent, hierarchical key-value storage with features like TTL, filtering, and batch operations. issue: langchain-ai#760
…rock (langchain-ai#880) Fixes langchain-ai#827. When streaming tool-use responses, Bedrock's Converse API sends tool input as incremental JSON string fragments across `contentBlockDelta` events. LangChain accumulates these into a JSON string on `content[].tool_use.input`. If this message is sent back to Bedrock, `_lc_content_to_bedrock` passes the string directly to the Bedrock API, which expects a dict, causing a `ValidationException`. PR langchain-ai#843 attempted to fix this by parsing input inside `_bedrock_to_lc`, but this broke streaming: `tool_call_chunks[].args` must be string, and parsing to dict at that level violated this requirement, resulting in Pydantic validation failures and chunk merging type mismatches. This fix in this PR instead parses string input to dict in `_lc_content_to_bedrock`, leaving the initial Bedrock->LC streaming accumulation and chunk merging untouched.
…ocker image, and narrow exception handlers
|
PR moved to LangChain Repo, see here. |
AI Disclaimer
This implementation was developed with assistance from AI coding agents (Claude/Kiro) for code generation, testing patterns, and documentation. All code has been manually reviewed and tested.
Why This Solution
Valkey GLIDE provides the official AWS-recommended client with better performance than the Redis fork. The synchronous API (
valkey-glide-sync) was chosen to match LangChain's synchronous VectorStore interface, ensuring seamless integration without async complexity.Key decisions:
ft.search(client, ...))Areas for Careful Review
utilities/valkey.py- cluster fallback logicfilters.py- operator precedencebase.py- KNN query format