f6aa19709e
feat(prebuilt): Add dynamic model to create_react_agent ( #5651 )
...
This PR allows a developer to change the model configuration at run time based on context. This includes that list of tools available to the model to call.
```python
def create_react_agent(
model: Union[
str,
LanguageModelLike,
Callable[[SateLike, Runtime...], BaseChatModel], # <--- New
],
tools: Union[
Sequence[Union[BaseTool, Callable, dict[str, Any]]], ToolNode]
],
*,
....
llm = init_chat_model(...)
def prepare_model(state, runtime):
selected_tool_names = func(state, context)
return llm.bind(tools=selected_tool_names)
create_react_agent(
prepare_model,
tools=all_known_tools
)
```
## Semantics
1. `tools` = are the known tools, used to configure ToolNode and will
configure:
1. model provided as string
2. model provided as BaseChatModel (if it has no tools bound to it)
2. If a user provides a dynamic model (callable), the user is
responsible for binding tools
Alternative considered:
1. Passing `Callable[[SateLike, Config...], list[BaseTool]]` to tools
2. Passing `Callable[[SateLike, Config...], list[str]]` to a tool
selector
Both have the issue that there's non obvious interplay between tool
selection and dynamic models. (i.e., if we want to introduce dynamic
models at in the future, the API will become tricky to explain)
---------
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com >
2025-07-25 14:48:15 -04:00
Sydney Runkle and GitHub
8495f6f95d
chore(ci): harden release workflow ( #5669 )
2025-07-25 14:45:18 -04:00
Eugene Yurtsev
6710908d40
x
2025-07-25 14:37:03 -04:00
Eugene Yurtsev
d24ad3d980
x
2025-07-25 14:34:49 -04:00
Eugene Yurtsev
2d8288fd0f
reduce permissions
2025-07-25 14:14:07 -04:00
c1ef10a0ec
chore: bump form-data from 4.0.1 to 4.0.4 in /docs ( #5615 )
...
Bumps [form-data](https://github.com/form-data/form-data ) from 4.0.1 to
4.0.4.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/form-data/form-data/blob/master/CHANGELOG.md ">form-data's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/form-data/form-data/compare/v4.0.3...v4.0.4 ">v4.0.4</a>
- 2025-07-16</h2>
<h3>Commits</h3>
<ul>
<li>[meta] add <code>auto-changelog</code> <a
href="https://github.com/form-data/form-data/commit/811f68282fab0315209d0e2d1c44b6c32ea0d479 "><code>811f682</code></a></li>
<li>[Tests] handle predict-v8-randomness failures in node < 17 and
node > 23 <a
href="https://github.com/form-data/form-data/commit/1d11a76434d101f22fdb26b8aef8615f28b98402 "><code>1d11a76</code></a></li>
<li>[Fix] Switch to using <code>crypto</code> random for boundary values
<a
href="https://github.com/form-data/form-data/commit/3d1723080e6577a66f17f163ecd345a21d8d0fd0 "><code>3d17230</code></a></li>
<li>[Tests] fix linting errors <a
href="https://github.com/form-data/form-data/commit/5e340800b5f8914213e4e0378c084aae71cfd73a "><code>5e34080</code></a></li>
<li>[meta] actually ensure the readme backup isn’t published <a
href="https://github.com/form-data/form-data/commit/316c82ba93fd4985af757b771b9a1f26d3b709ef "><code>316c82b</code></a></li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code> <a
href="https://github.com/form-data/form-data/commit/58c25d76406a5b0dfdf54045cf252563f2bbda8d "><code>58c25d7</code></a></li>
<li>[meta] fix readme capitalization <a
href="https://github.com/form-data/form-data/commit/2300ca19595b0ee96431e868fe2a40db79e41c61 "><code>2300ca1</code></a></li>
</ul>
<h2><a
href="https://github.com/form-data/form-data/compare/v4.0.2...v4.0.3 ">v4.0.3</a>
- 2025-06-05</h2>
<h3>Fixed</h3>
<ul>
<li>[Fix] <code>append</code>: avoid a crash on nullish values <a
href="https://redirect.github.com/form-data/form-data/issues/577 "><code>[#577 ](https://github.com/form-data/form-data/issues/577 )</code></a></li>
</ul>
<h3>Commits</h3>
<ul>
<li>[eslint] use a shared config <a
href="https://github.com/form-data/form-data/commit/426ba9ac440f95d1998dac9a5cd8d738043b048f "><code>426ba9a</code></a></li>
<li>[eslint] fix some spacing issues <a
href="https://github.com/form-data/form-data/commit/20941917f0e9487e68c564ebc3157e23609e2939 "><code>2094191</code></a></li>
<li>[Refactor] use <code>hasown</code> <a
href="https://github.com/form-data/form-data/commit/81ab41b46fdf34f5d89d7ff30b513b0925febfaa "><code>81ab41b</code></a></li>
<li>[Fix] validate boundary type in <code>setBoundary()</code> method <a
href="https://github.com/form-data/form-data/commit/8d8e4693093519f7f18e3c597d1e8df8c493de9e "><code>8d8e469</code></a></li>
<li>[Tests] add tests to check the behavior of <code>getBoundary</code>
with non-strings <a
href="https://github.com/form-data/form-data/commit/837b8a1f7562bfb8bda74f3fc538adb7a5858995 "><code>837b8a1</code></a></li>
<li>[Dev Deps] remove unused deps <a
href="https://github.com/form-data/form-data/commit/870e4e665935e701bf983a051244ab928e62d58e "><code>870e4e6</code></a></li>
<li>[meta] remove local commit hooks <a
href="https://github.com/form-data/form-data/commit/e6e83ccb545a5619ed6cd04f31d5c2f655eb633e "><code>e6e83cc</code></a></li>
<li>[Dev Deps] update <code>eslint</code> <a
href="https://github.com/form-data/form-data/commit/4066fd6f65992b62fa324a6474a9292a4f88c916 "><code>4066fd6</code></a></li>
<li>[meta] fix scripts to use prepublishOnly <a
href="https://github.com/form-data/form-data/commit/c4bbb13c0ef669916657bc129341301b1d331d75 "><code>c4bbb13</code></a></li>
</ul>
<h2><a
href="https://github.com/form-data/form-data/compare/v4.0.1...v4.0.2 ">v4.0.2</a>
- 2025-02-14</h2>
<h3>Merged</h3>
<ul>
<li>[Fix] set <code>Symbol.toStringTag</code> when available <a
href="https://redirect.github.com/form-data/form-data/pull/573 "><code>[#573 ](https://github.com/form-data/form-data/issues/573 )</code></a></li>
<li>[Fix] set <code>Symbol.toStringTag</code> when available <a
href="https://redirect.github.com/form-data/form-data/pull/573 "><code>[#573 ](https://github.com/form-data/form-data/issues/573 )</code></a></li>
<li>fix (npmignore): ignore temporary build files <a
href="https://redirect.github.com/form-data/form-data/pull/532 "><code>[#532 ](https://github.com/form-data/form-data/issues/532 )</code></a></li>
<li>fix (npmignore): ignore temporary build files <a
href="https://redirect.github.com/form-data/form-data/pull/532 "><code>[#532 ](https://github.com/form-data/form-data/issues/532 )</code></a></li>
</ul>
<h3>Fixed</h3>
<ul>
<li>[Fix] set <code>Symbol.toStringTag</code> when available (<a
href="https://redirect.github.com/form-data/form-data/issues/573 ">#573</a>)
<a
href="https://redirect.github.com/form-data/form-data/issues/396 "><code>[#396 ](https://github.com/form-data/form-data/issues/396 )</code></a></li>
<li>[Fix] set <code>Symbol.toStringTag</code> when available (<a
href="https://redirect.github.com/form-data/form-data/issues/573 ">#573</a>)
<a
href="https://redirect.github.com/form-data/form-data/issues/396 "><code>[#396 ](https://github.com/form-data/form-data/issues/396 )</code></a></li>
<li>[Fix] set <code>Symbol.toStringTag</code> when available <a
href="https://redirect.github.com/form-data/form-data/issues/396 "><code>[#396 ](https://github.com/form-data/form-data/issues/396 )</code></a></li>
</ul>
<h3>Commits</h3>
<ul>
<li>Merge tags v2.5.3 and v3.0.3 <a
href="https://github.com/form-data/form-data/commit/92613b9208556eb4ebc482fdf599fae111626fb6 "><code>92613b9</code></a></li>
<li>[Tests] migrate from travis to GHA <a
href="https://github.com/form-data/form-data/commit/806eda77740e6e3c67c7815afb216f2e1f187ba5 "><code>806eda7</code></a></li>
<li>[Tests] migrate from travis to GHA <a
href="https://github.com/form-data/form-data/commit/8fdb3bc6b5d001f8909a9fca391d1d1d97ef1d79 "><code>8fdb3bc</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/form-data/form-data/commit/41996f5ac73a867046d48512cab62e64fc846dad "><code>41996f5</code></a>
v4.0.4</li>
<li><a
href="https://github.com/form-data/form-data/commit/316c82ba93fd4985af757b771b9a1f26d3b709ef "><code>316c82b</code></a>
[meta] actually ensure the readme backup isn’t published</li>
<li><a
href="https://github.com/form-data/form-data/commit/2300ca19595b0ee96431e868fe2a40db79e41c61 "><code>2300ca1</code></a>
[meta] fix readme capitalization</li>
<li><a
href="https://github.com/form-data/form-data/commit/811f68282fab0315209d0e2d1c44b6c32ea0d479 "><code>811f682</code></a>
[meta] add <code>auto-changelog</code></li>
<li><a
href="https://github.com/form-data/form-data/commit/5e340800b5f8914213e4e0378c084aae71cfd73a "><code>5e34080</code></a>
[Tests] fix linting errors</li>
<li><a
href="https://github.com/form-data/form-data/commit/1d11a76434d101f22fdb26b8aef8615f28b98402 "><code>1d11a76</code></a>
[Tests] handle predict-v8-randomness failures in node < 17 and node
> 23</li>
<li><a
href="https://github.com/form-data/form-data/commit/58c25d76406a5b0dfdf54045cf252563f2bbda8d "><code>58c25d7</code></a>
[Dev Deps] update <code>@ljharb/eslint-config</code></li>
<li><a
href="https://github.com/form-data/form-data/commit/3d1723080e6577a66f17f163ecd345a21d8d0fd0 "><code>3d17230</code></a>
[Fix] Switch to using <code>crypto</code> random for boundary
values</li>
<li><a
href="https://github.com/form-data/form-data/commit/d8d67dc8ac79285154edf7d3f57dbab593b9a146 "><code>d8d67dc</code></a>
v4.0.3</li>
<li><a
href="https://github.com/form-data/form-data/commit/e6e83ccb545a5619ed6cd04f31d5c2f655eb633e "><code>e6e83cc</code></a>
[meta] remove local commit hooks</li>
<li>Additional commits viewable in <a
href="https://github.com/form-data/form-data/compare/v4.0.1...v4.0.4 ">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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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/langgraph/network/alerts ).
</details>
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-25 13:31:18 -04:00
Eugene Yurtsev and GitHub
a3d7b6f44e
chore(checkpoint-sqlite): Release 2.0.11 ( #5667 )
...
Release new version
checkpointsqlite==2.0.11
2025-07-25 17:26:26 +00:00
Eugene Yurtsev and GitHub
bc9d45b476
fix(checkpoint-sqlite): add validation to filter keys in sql store ( #5666 )
...
This PR adds validation to keys used in filtering logic in the SQLite store implementation.
2025-07-25 13:01:13 -04:00
Sydney Runkle and GitHub
7d3f0089aa
docs: more thorough notes on v0.6 features and changes ( #5623 )
2025-07-25 09:33:53 -04:00
Sydney Runkle and GitHub
ed678f4701
Merge branch 'main' into sr/version-added-for-context
2025-07-25 09:27:52 -04:00
Sydney Runkle
22411ba0fd
lint
2025-07-25 09:27:34 -04:00
Sydney Runkle
5b9021ff37
typo
2025-07-25 09:25:26 -04:00
Sydney Runkle
aaff464115
move deprecation note for config_schema
2025-07-25 09:23:59 -04:00
Sam Crowder and GitHub
3a23a256e2
docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) ( #5657 )
2025-07-24 20:37:10 -07:00
Sam Crowder
f6857395b9
Update changelog via LangGraph Server Changelog Bot
2025-07-24 20:19:17 -07:00
William FH and GitHub
cdaa7ba003
chore: typing for headers in remote graph ( #5653 )
2025-07-24 18:00:44 -07:00
Sydney Runkle
39745ed794
Merge branch 'sr/version-added-for-context' of https://github.com/langchain-ai/langgraph into sr/version-added-for-context
2025-07-24 17:31:25 -04:00
Sydney Runkle
738bb8a343
Merge branch 'sr/fixes-for-v6' into sr/version-added-for-context
2025-07-24 17:31:21 -04:00
Sydney Runkle and GitHub
b2dde8d9af
Merge branch 'main' into sr/version-added-for-context
2025-07-24 17:29:54 -04:00
Sydney Runkle
5312edc830
more runtime details
2025-07-24 17:28:58 -04:00
Sydney Runkle
276310e116
fix and interrupt
2025-07-24 16:54:20 -04:00
Sydney Runkle
39977ded8c
runtime api ref
2025-07-24 16:36:51 -04:00
Sydney Runkle
439038fc3a
deprecation for config_schema in docs
2025-07-24 16:23:42 -04:00
Sam Crowder and GitHub
2e5445c565
docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) ( #5650 )
2025-07-24 11:35:22 -07:00
Sam Crowder
d38510ad03
Update changelog via LangGraph Server Changelog Bot
2025-07-24 09:18:21 -07:00
Sydney Runkle and GitHub
951486d107
release(prebuilt): 0.6.0 ( #5648 )
2025-07-24 10:38:24 -04:00
Sydney Runkle
745a1e7a29
bumping required prebuilt version
2025-07-24 10:27:20 -04:00
Sam Crowder and GitHub
24731d6a28
docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) ( #5625 )
2025-07-23 20:06:22 -07:00
Sam Crowder
a4689a5d10
Update changelog via LangGraph Server Changelog Bot
2025-07-23 18:59:50 -07:00
langchain-infra and GitHub
b05ce0bf60
release(cli): Release new CLI version with support for api-version flag ( #5640 )
cli==0.3.6
2025-07-23 19:47:25 -04:00
David Asamu
4501e41991
uv sync
2025-07-24 00:36:02 +01:00
Asamu David and GitHub
bc83287fc8
bump version number
...
new CLI version with support for api-version flag
2025-07-24 00:19:57 +01:00
Andrew Nguonly and GitHub
11547e1990
docs: Add more clarification about the LangSmith API key for LangGraph Platform deployments ( #5635 )
2025-07-23 11:39:39 -07:00
langchain-infra and GitHub
fadd9c4577
feat(cli): add support for api-version ( #5584 )
2025-07-23 12:33:04 -04:00
Asamu David and GitHub
fd2933a792
Merge branch 'main' into david/30-06/support-base-image-tag
2025-07-23 15:42:24 +01:00
David Asamu
40fa69f8ee
lint and format fixes
2025-07-23 15:39:34 +01:00
Sam Crowder
0824161984
Update changelog via LangGraph Server Changelog Bot
2025-07-22 13:47:31 -07:00
Sam Crowder and GitHub
b028f502e1
docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) ( #5611 )
2025-07-22 12:47:33 -07:00
William FH and GitHub
9dc3fed6b8
feat(langgraph): Support sending distributed tracing headers ( #5619 )
2025-07-22 12:47:23 -07:00
Sydney Runkle
0232201b7b
improving docs for context
2025-07-22 13:28:27 -04:00
Sydney Runkle and GitHub
869b0f2de4
release(sdk-py): 0.2.0 ( #5622 )
sdk==0.2.0
2025-07-22 13:27:04 -04:00
Sydney Runkle
90e3adcd71
bump sdk version
2025-07-22 13:20:55 -04:00
Sydney Runkle and GitHub
cb918601d1
release: prep for langgraph v0.6 ( #5325 )
0.6.0a1
sdk==0.2.0a1
2025-07-22 13:14:31 -04:00
Sydney Runkle
4a4c8db635
fix header
2025-07-22 12:54:21 -04:00
Sydney Runkle
56a9ce57b1
docs build fixes
2025-07-22 12:46:56 -04:00
Sydney Runkle
d1ee1cf1f1
docs fix
2025-07-22 11:19:08 -04:00
Sydney Runkle and GitHub
29c3a579b3
release(sdk-py): use v0.2.0a1 for testing with sdk ( #5621 )
2025-07-22 15:08:07 +00:00
Sydney Runkle and GitHub
9e3cb1f034
feat(sdk-py): sdk support for context API ( #5566 )
...
Adding support for the `context` arg to `invoke/stream` to the sdk. This
is paired with an update to the API as well that adds `context` support
to the `assistants` and `runs` endpoints.
Bumping version to v0.2.0 on the `v1` branch given this and the
interrupt schema changes.
2025-07-22 10:48:12 -04:00
Sydney Runkle and GitHub
508e333220
Merge branch 'main' into v1
2025-07-22 08:55:42 -04:00
Sam Crowder
aa1bbe3d01
Update changelog via LangGraph Server Changelog Bot
2025-07-21 17:41:55 -07:00