ccurme
002d623f2d
feat: (core, standard-tests) support PDF inputs in ToolMessages ( #33183 )
2025-10-01 10:16:16 -04:00
Mohammad Mohtashim
34f8031bd9
feat(langchain): Using Structured Response as Key in Output Schema for Middleware Agent ( #33159 )
...
- **Description:** Changing the key from `response` to
`structured_response` for middleware agent to keep it sync with agent
without middleware. This a breaking change.
- **Issue:** #33154
2025-10-01 03:24:59 +00:00
Mason Daugherty
a541b5bee1
chore(infra): rfc README.md for better presentation ( #33172 )
2025-09-30 17:44:42 -04:00
Mason Daugherty
3e970506ba
chore(core): remove runnable section from README.md ( #33171 )
2025-09-30 17:15:31 -04:00
Mason Daugherty
d1b0196faa
chore(infra): whitespace fix ( #33170 )
2025-09-30 17:14:55 -04:00
ccurme
aac69839a9
release(openai): 0.3.34 ( #33169 )
2025-09-30 16:48:39 -04:00
ccurme
64141072a3
feat(openai): support openai sdk 2.0 ( #33168 )
2025-09-30 16:34:00 -04:00
Mason Daugherty
0795be2a04
docs(core): remove non-existent param from as_tool docstring ( #33165 )
2025-09-30 19:43:34 +00:00
Eugene Yurtsev
9c97597175
chore(langchain_v1): expose middleware decorators and selected messages ( #33163 )
...
* Make it easy to improve the middleware shortcuts
* Export the messages that we're confident we'll expose
2025-09-30 14:14:57 -04:00
Sydney Runkle
eed0f6c289
feat(langchain): todo middleware ( #33152 )
...
Porting the [planning
middleware](39c0138d0f/src/deepagents/middleware.py (L21) )
over from deepagents.
Also adding the ability to configure:
* System prompt
* Tool description
```py
from langchain.agents.middleware.planning import PlanningMiddleware
from langchain.agents import create_agent
agent = create_agent("openai:gpt-4o", middleware=[PlanningMiddleware()])
result = await agent.invoke({"messages": [HumanMessage("Help me refactor my codebase")]})
print(result["todos"]) # Array of todo items with status tracking
```
2025-09-30 02:23:26 +00:00
ccurme
729637a347
docs(anthropic): document support for memory tool and context management ( #33149 )
2025-09-29 16:38:01 -04:00
Mason Daugherty
3325196be1
fix(langchain): handle gpt-5 model name in init_chat_model ( #33148 )
...
expand to match any `gpt-*` model to openai
2025-09-29 16:16:17 -04:00
Mason Daugherty
f402fdcea3
fix(langchain): add context_management to Anthropic chat model init ( #33150 )
2025-09-29 16:13:47 -04:00
ccurme
ca9217c02d
release(anthropic): 0.3.21 ( #33147 )
langchain-anthropic==0.3.21
2025-09-29 19:56:28 +00:00
ccurme
f9bae40475
feat(anthropic): support memory and context management features ( #33146 )
...
https://docs.claude.com/en/docs/build-with-claude/context-editing
---------
Co-authored-by: Mason Daugherty <mason@langchain.dev >
2025-09-29 15:42:38 -04:00
ccurme
839a18e112
fix(openai): remove __future__.annotations import from test files ( #33144 )
...
Breaks schema conversion in places.
2025-09-29 16:23:32 +00:00
Mohammad Mohtashim
33a6def762
fix(core): Support of 'reasoning' type in 'convert_to_openai_messages' ( #33050 )
langchain==1.0.0a10
2025-09-29 09:17:05 -04:00
nhuang-lc
c456c8ae51
fix(langchain): fix response action for HITL ( #33131 )
...
Multiple improvements to HITL flow:
* On a `response` type resume, we should still append the tool call to
the last AIMessage (otherwise we have a ToolResult without a
corresponding ToolCall)
* When all interrupts have `response` types (so there's no pending tool
calls), we should jump back to the first node (instead of end) as we
enforced in the previous `post_model_hook_router`
* Added comments to `model_to_tools` router so clarify all of the
potential exit conditions
Additionally:
* Lockfile update to use latest LG alpha release
* Added test for `jump_to` behaving ephemerally, this was fixed in LG
but surfaced as a bug w/ `jump_to`.
* Bump version to v1.0.0a10 to prep for alpha release
---------
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com >
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com >
2025-09-29 13:08:18 +00:00
Eugene Yurtsev
54ea62050b
chore(langchain_v1): move tool node to tools namespace ( #33132 )
...
* Move ToolNode to tools namespace
* Expose injected variable as well in tools namespace
* Update doc-strings throughout
2025-09-26 15:23:57 -04:00
Mason Daugherty
986302322f
docs: more standardization ( #33124 )
2025-09-25 20:46:20 -04:00
Mason Daugherty
a5137b0a3e
refactor(langchain): resolve pydantic deprecation warnings ( #33125 )
2025-09-25 17:33:18 -04:00
Mason Daugherty
5bea28393d
docs: standardize .. code-block directive usage ( #33122 )
...
and fix typos
2025-09-25 16:49:56 -04:00
Mason Daugherty
c3fed20940
docs: correct ported over directives ( #33121 )
...
Match rest of repo
2025-09-25 15:54:54 -04:00
Mason Daugherty
6d418ba983
test(mistralai): add xfail for structured output test ( #33119 )
...
In rare cases (difficult to reproduce), Mistral's API fails to return
valid bodies, leading to failures from `PydanticToolsParser`
2025-09-25 13:05:31 -04:00
Mason Daugherty
12daba63ff
test(openai): raise token limit for o1 test ( #33118 )
...
`test_o1[False-False]` was sometimes failing because the OpenAI o1 model
was hitting a token limit with only 100 tokens
2025-09-25 12:57:33 -04:00
Christophe Bornet
eaf8dce7c2
chore: bump ruff version to 0.13 ( #33043 )
...
Co-authored-by: Mason Daugherty <mason@langchain.dev >
2025-09-25 12:27:39 -04:00
Mason Daugherty
f82de1a8d7
chore: bump locks ( #33114 )
2025-09-25 01:46:01 -04:00
Mason Daugherty
e3efd1e891
test(text-splitters): capture beta warnings ( #33113 )
2025-09-25 01:30:20 -04:00
Mason Daugherty
d6769cf032
test(text-splitters): resolve pytest marker warning ( #33112 )
...
#33111
2025-09-25 01:29:42 -04:00
Mason Daugherty
7ab2e0dd3b
test(core): resolve pytest marker warning ( #33111 )
...
Remove redundant/outdated `@pytest.mark.requires("jinja2")` decorator
Pytest marks (like `@pytest.mark.requires(...)`) applied directly to
fixtures have no effect and are deprecated.
2025-09-25 01:08:54 -04:00
Mason Daugherty
81319ad3f0
test(core): resolve pydantic_v1 deprecation warning ( #33110 )
...
Excluded pydantic_v1 module from import testing
Acceptable since this pydantic_v1 is explicitly deprecated. Testing its
importability at this stage serves little purpose since users should
migrate away from it.
2025-09-25 01:08:03 -04:00
Mason Daugherty
e3f3c13b75
refactor(core): use aadd_documents in vectorstores unit tests ( #33109 )
...
Don't use the deprecated `upsert()` and `aupsert()`
Instead use the recommended alternatives
2025-09-25 00:57:08 -04:00
Mason Daugherty
c30844fce4
fix(core): use version agnostic get_fields ( #33108 )
...
Resolves a warning
2025-09-25 00:54:29 -04:00
Mason Daugherty
c9eb3bdb2d
test(core): use secure hash algorithm in indexing test to eliminate SHA-1 warning ( #33107 )
...
Finish work from #33101
2025-09-25 00:49:11 -04:00
Mason Daugherty
e97baeb9a6
test(core): suppress pydantic_v1 deprecation warnings during import tests ( #33106 )
...
We intentionally import these. Hide warnings to reduce testing noise.
2025-09-25 00:37:40 -04:00
Mason Daugherty
3a6046b157
test(core): don't use deprecated input_variables param in from_file ( #33105 )
...
finish #33104
2025-09-25 04:29:31 +00:00
Mason Daugherty
8fdc619f75
refactor(core): don't use deprecated input_variables param in from_file ( #33104 )
...
Missed awhile back; causes warnings during tests
2025-09-25 00:14:17 -04:00
Ali Ismail
729bfe8369
test(core): enhance stringify_value test coverage for nested structures ( #33099 )
...
## Summary
Adds test coverage for the `stringify_value` utility function to handle
complex nested data structures that weren't previously tested.
## Changes
- Added `test_stringify_value_nested_structures()` to `test_strings.py`
- Tests nested dictionaries within lists
- Tests mixed-type lists with various data types
- Verifies proper stringification of complex nested structures
## Why This Matters
- Fills a gap in test coverage for edge cases
- Ensures `stringify_value` handles complex data structures correctly
- Improves confidence in string utility functions used throughout the
codebase
- Low risk addition that strengthens existing test suite
## Testing
```bash
uv run --group test pytest libs/core/tests/unit_tests/utils/test_strings.py::test_stringify_value_nested_structures -v
```
This test addition follows the project's testing patterns and adds
meaningful coverage without introducing any breaking changes.
---------
Co-authored-by: Mason Daugherty <mason@langchain.dev >
2025-09-25 00:04:47 -04:00
Mason Daugherty
9b624a79b2
test(core): suppress deprecation warnings in PipelinePromptTemplate ( #33102 )
...
We're intentionally testing this still so as not to regress. Reduce
warning noise.
2025-09-25 04:03:27 +00:00
Mason Daugherty
c60c5a91cb
fix(core): use secure hash algorithm in indexing test to eliminate SHA-1 warning ( #33101 )
...
Use SHA-256 (collision-resistant) instead of the default SHA-1. No
functional changes to test behavior.
2025-09-25 00:02:11 -04:00
Mason Daugherty
d9e0c212e0
chore(infra): add tests to label mapping ( #33103 )
2025-09-25 00:01:53 -04:00
Sydney Runkle
f015526e42
release(langchain): v1.0.0a9 ( #33098 )
langchain==1.0.0a9
2025-09-24 21:02:53 +00:00
Sydney Runkle
57d931532f
fix(langchain): extra arg for anthropic caching, __end__ -> end for jump_to ( #33097 )
...
Also updating `jump_to` to use `end` instead of `__end__`
2025-09-24 17:00:40 -04:00
Mason Daugherty
50012d95e2
chore: update pull_request_target types, harden ( #33096 )
...
Enhance the pull request workflows by updating the `pull_request_target`
types and ensuring safety by avoiding checkout of the PR's head. Update
the action to use a specific commit from the archived repository.
2025-09-24 16:37:16 -04:00
Mason Daugherty
33f06875cb
fix(langchain_v1): version equality check ( #33095 )
2025-09-24 16:27:55 -04:00
dependabot[bot]
e5730307e7
chore: bump actions/setup-node from 4 to 5 ( #32952 )
...
Bumps [actions/setup-node](https://github.com/actions/setup-node ) from 4
to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-node/releases ">actions/setup-node's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<h3>Breaking Changes</h3>
<ul>
<li>Enhance caching in setup-node with automatic package manager
detection by <a
href="https://github.com/priya-kinthali "><code>@priya-kinthali</code></a>
in <a
href="https://redirect.github.com/actions/setup-node/pull/1348 ">actions/setup-node#1348</a></li>
</ul>
<p>This update, introduces automatic caching when a valid
<code>packageManager</code> field is present in your
<code>package.json</code>. This aims to improve workflow performance and
make dependency management more seamless.
To disable this automatic caching, set <code>package-manager-cache:
false</code></p>
<pre lang="yaml"><code>steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
package-manager-cache: false
</code></pre>
<ul>
<li>Upgrade action to use node24 by <a
href="https://github.com/salmanmkc "><code>@salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/setup-node/pull/1325 ">actions/setup-node#1325</a></li>
</ul>
<p>Make sure your runner is on version v2.327.1 or later to ensure
compatibility with this release. <a
href="https://github.com/actions/runner/releases/tag/v2.327.1 ">See
Release Notes</a></p>
<h3>Dependency Upgrades</h3>
<ul>
<li>Upgrade <code>@octokit/request-error</code> and
<code>@actions/github</code> by <a
href="https://github.com/dependabot "><code>@dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-node/pull/1227 ">actions/setup-node#1227</a></li>
<li>Upgrade uuid from 9.0.1 to 11.1.0 by <a
href="https://github.com/dependabot "><code>@dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-node/pull/1273 ">actions/setup-node#1273</a></li>
<li>Upgrade undici from 5.28.5 to 5.29.0 by <a
href="https://github.com/dependabot "><code>@dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-node/pull/1295 ">actions/setup-node#1295</a></li>
<li>Upgrade form-data to bring in fix for critical vulnerability by <a
href="https://github.com/gowridurgad "><code>@gowridurgad</code></a> in
<a
href="https://redirect.github.com/actions/setup-node/pull/1332 ">actions/setup-node#1332</a></li>
<li>Upgrade actions/checkout from 4 to 5 by <a
href="https://github.com/dependabot "><code>@dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-node/pull/1345 ">actions/setup-node#1345</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/priya-kinthali "><code>@priya-kinthali</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-node/pull/1348 ">actions/setup-node#1348</a></li>
<li><a href="https://github.com/salmanmkc "><code>@salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-node/pull/1325 ">actions/setup-node#1325</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-node/compare/v4...v5.0.0 ">https://github.com/actions/setup-node/compare/v4...v5.0.0 </a></p>
<h2>v4.4.0</h2>
<h2>What's Changed</h2>
<h3>Bug fixes:</h3>
<ul>
<li>Make eslint-compact matcher compatible with Stylelint by <a
href="https://github.com/FloEdelmann "><code>@FloEdelmann</code></a>
in <a
href="https://redirect.github.com/actions/setup-node/pull/98 ">actions/setup-node#98</a></li>
<li>Add support for indented eslint output by <a
href="https://github.com/fregante "><code>@fregante</code></a> in <a
href="https://redirect.github.com/actions/setup-node/pull/1245 ">actions/setup-node#1245</a></li>
</ul>
<h3>Enhancement:</h3>
<ul>
<li>Support private mirrors by <a
href="https://github.com/marco-ippolito "><code>@marco-ippolito</code></a>
in <a
href="https://redirect.github.com/actions/setup-node/pull/1240 ">actions/setup-node#1240</a></li>
</ul>
<h3>Dependency update:</h3>
<ul>
<li>Upgrade <code>@action/cache</code> from 4.0.2 to 4.0.3 by <a
href="https://github.com/aparnajyothi-y "><code>@aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-node/pull/1262 ">actions/setup-node#1262</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/FloEdelmann "><code>@FloEdelmann</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-node/pull/98 ">actions/setup-node#98</a></li>
<li><a href="https://github.com/fregante "><code>@fregante</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-node/pull/1245 ">actions/setup-node#1245</a></li>
<li><a
href="https://github.com/marco-ippolito "><code>@marco-ippolito</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-node/pull/1240 ">actions/setup-node#1240</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-node/compare/v4...v4.4.0 ">https://github.com/actions/setup-node/compare/v4...v4.4.0 </a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a0853c2454 "><code>a0853c2</code></a>
Bump actions/checkout from 4 to 5 (<a
href="https://redirect.github.com/actions/setup-node/issues/1345 ">#1345</a>)</li>
<li><a
href="b7234cc9fe "><code>b7234cc</code></a>
Upgrade action to use node24 (<a
href="https://redirect.github.com/actions/setup-node/issues/1325 ">#1325</a>)</li>
<li><a
href="d7a11313b5 "><code>d7a1131</code></a>
Enhance caching in setup-node with automatic package manager detection
(<a
href="https://redirect.github.com/actions/setup-node/issues/1348 ">#1348</a>)</li>
<li><a
href="5e2628c959 "><code>5e2628c</code></a>
Bumps form-data (<a
href="https://redirect.github.com/actions/setup-node/issues/1332 ">#1332</a>)</li>
<li><a
href="65beceff8e "><code>65becef</code></a>
Bump undici from 5.28.5 to 5.29.0 (<a
href="https://redirect.github.com/actions/setup-node/issues/1295 ">#1295</a>)</li>
<li><a
href="7e24a656e1 "><code>7e24a65</code></a>
Bump uuid from 9.0.1 to 11.1.0 (<a
href="https://redirect.github.com/actions/setup-node/issues/1273 ">#1273</a>)</li>
<li><a
href="08f58d1471 "><code>08f58d1</code></a>
Bump <code>@octokit/request-error</code> and
<code>@actions/github</code> (<a
href="https://redirect.github.com/actions/setup-node/issues/1227 ">#1227</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/setup-node/compare/v4...v5 ">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)
</details>
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-24 16:26:05 -04:00
Mason Daugherty
4783a9c18e
style: update workflow name for version equality check ( #33094 )
2025-09-24 20:11:30 +00:00
Mason Daugherty
ee4d84de7c
style(core): typo/docs lint pass ( #33093 )
2025-09-24 16:11:21 -04:00
Mason Daugherty
092dd5e174
chore: update link for monorepo structure ( #33091 )
2025-09-24 19:55:00 +00:00
Sydney Runkle
dd81e1c3fb
release(langchain): 1.0.0a8 ( #33090 )
langchain==1.0.0a8
2025-09-24 15:31:29 -04:00