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
Sydney Runkle
135a5b97e6
feat(langchain): improvements to anthropic prompt caching ( #33058 )
...
Adding an `unsupported_model_behavior` arg that can be `'ignore'`,
`'warn'`, or `'raise'`. Defaults to `'warn'`.
2025-09-24 15:28:49 -04:00
Mason Daugherty
b92b394804
style: repo linting pass ( #33089 )
...
enable docstring-code-format
2025-09-24 15:25:55 -04:00
Sydney Runkle
083bb3cdd7
fix(langchain): need to inject all state for tools registered by middleware ( #33087 )
...
Type hints matter for conditional edges!
2025-09-24 15:25:51 -04:00
Mason Daugherty
2e9291cdd7
fix: lift openai version constraints across packages ( #33088 )
...
re: #33038 and https://github.com/openai/openai-python/issues/2644
2025-09-24 15:25:10 -04:00
Sydney Runkle
4f8a76b571
chore(langchain): renaming for HITL ( #33067 )
2025-09-24 07:19:44 -04:00
Mason Daugherty
05ba941230
style(cli): linting pass ( #33078 )
2025-09-24 01:24:52 -04:00
Mason Daugherty
ae4976896e
chore: delete erroneous .readthedocs.yaml ( #33079 )
...
From the legacy docs/not needed here
2025-09-24 01:24:42 -04:00
Mason Daugherty
504ef96500
chore: add commit message generation instructions for VSCode ( #33077 )
2025-09-24 05:06:43 +00:00
Mason Daugherty
d99a02bb27
chore: add AGENTS.md ( #33076 )
...
it would be super cool if Anthropic supported this instead of
`CLAUDE.md` :/
https://agents.md/
2025-09-24 05:02:14 +00:00
Mason Daugherty
793de80429
chore: update label mapping in PR title labeler configuration ( #33075 )
2025-09-24 01:00:14 -04:00
Mason Daugherty
7d4e9d8cda
revert(infra): put SECURITY.md at root ( #33074 )
2025-09-24 00:54:37 -04:00
Mason Daugherty
54dca494cf
chore: delete erroneous poetry.toml configuration file ( #33073 )
...
- Not used by the current build system
- Potentially confusing for new contributors
- A leftover artifact from the Poetry to uv migration
2025-09-24 04:40:17 +00:00
Mason Daugherty
7b30e58386
chore: delete erroneous yarn.lock in root ( #33072 )
...
Appears to have had no purpose/was added by mistake and nobody
questioned it
2025-09-24 04:35:00 +00:00
Mason Daugherty
e62b541dfd
chore(infra): move SECURITY.md to .github ( #33071 )
...
cleaning up top-level. `.github` folder placement will continue to show
on repo homepage:
https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository#about-security-policies
2025-09-24 00:27:48 -04:00
Mason Daugherty
8699980d09
chore(scripts): remove obsolete release and mypy/ruff update scripts ( #33070 )
...
Outdated scripts related to release management and mypy/ruff updates
Cleaning up the root-level
2025-09-24 04:24:38 +00:00
Mason Daugherty
79e536b0d6
chore(infra): further docs build cleanup ( #33057 )
...
Reorganize the requirements for better clarity and consistency. Improve
documentation on scripts and workflows.
2025-09-23 17:29:58 -04:00