Commit Graph

2263 Commits

Author SHA1 Message Date
Mason Daugherty
879cad0676 release(openai): 1.3.2 (#38130) 2026-06-13 01:34:56 -04:00
Mason Daugherty
37b339f8c4 fix(openai): build Codex async headers off the event loop in _agenerate (#38129)
The Codex `_astream` path was reworked to build its auth headers from an
async-fetched token, but `_agenerate` was left on the old "prime the
cache, then read it back synchronously" approach. That sync read still
went through `_FileChatGPTOAuthTokenProvider.get_token`, which acquires
a thread lock and a cross-process file lock on every call — blocking the
event loop even when the token is already warm. Both async paths now
build headers the same way, so neither touches sync `get_token` on the
loop.

## Changes
- `_ChatOpenAICodex._agenerate` now fetches the token via `aget_token`,
builds the Codex headers off-loop, and hands them to
`_get_request_payload` through the private `_codex_headers` kwarg —
eliminating the synchronous token read (and its lock acquisition) that
previously ran on the event loop inside `super()._agenerate`.
- Replaced the duplicated `"_codex_headers"` string literal across
`_agenerate`, `_astream`, and `_get_request_payload` with a
`_CODEX_HEADERS_KWARG` module constant, documenting that the kwarg is
popped before the payload reaches the SDK.
- Documented the deliberate `is not None` check in
`_get_request_payload`: an explicitly-built empty header dict
(accountless token with `originator=None`) is honored as-is rather than
falling back to the blocking sync read.
2026-06-13 01:33:37 -04:00
Mason Daugherty
11429a9e1c fix(openai): avoid sync token reads in Codex streaming (#38128)
Codex streaming now builds request headers from the async token path
instead of refreshing asynchronously and later reading the token
synchronously during payload construction. That keeps
`_ChatOpenAICodex._astream` off the sync token path while preserving the
`ChatGPT-Account-Id` and `originator` headers needed by Codex requests.
2026-06-13 01:26:48 -04:00
Mason Daugherty
454e19588c hotfix(openai): skip Codex live integration tests in CI (#38124) 2026-06-12 22:34:40 -04:00
Mason Daugherty
9e6f58ba46 hotfix(openai): switch version (#38123) 2026-06-12 22:21:34 -04:00
Mason Daugherty
bf7b0180f2 refactor(openai): mark Codex OAuth classes private (#38122)
- Mark the Codex OAuth model/token helper classes private with leading
underscores
- Remove `_ChatOpenAICodex` from package-level public exports
- Keep a once-per-process runtime warning that use is
experimental/unofficial and must comply with applicable OpenAI account,
workspace, plan, terms, policies, rate limits, and safeguards
2026-06-12 22:19:40 -04:00
Mason Daugherty
8180a09dd7 release(openai): 1.4.0 (#38120) 2026-06-12 21:52:20 -04:00
open-swe[bot]
6c2b70e60e feat(openai): add ChatGPT OAuth-backed ChatOpenAICodex chat model (#37569)
[Docs](https://github.com/langchain-ai/docs/pull/4115)

Adds a new `ChatOpenAICodex` chat model and a small `chatgpt_oauth`
module so users can authenticate with their ChatGPT subscription (OAuth
2.0 Authorization Code Flow with PKCE) and route Responses-API requests
to the ChatGPT Codex backend at `https://chatgpt.com/backend-api/codex`.
Login and token persistence live behind a refresh-aware
`ChatGPTOAuthTokenProvider` protocol so they stay decoupled from model
invocation. The existing API-key `ChatOpenAI` behavior is untouched. By
default the file-backed provider writes to
`~/.langchain/chatgpt-auth.json` to avoid stomping on Codex CLI / VS
Code sessions at `~/.codex/auth.json`. No new required dependencies are
introduced (uses stdlib + `httpx`).

```python
from langchain_openai import ChatOpenAICodex
from langchain_openai.chatgpt_oauth import login_chatgpt

login_chatgpt()
model = ChatOpenAICodex(model="gpt-5.5")
response = model.invoke("hello")
```

_Opened collaboratively by Mason Daugherty and open-swe._

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Mason Daugherty <61371264+mdrxy@users.noreply.github.com>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
2026-06-12 21:49:03 -04:00
Mason Daugherty
63cc1f4e7d docs: refresh README installation and resources (#38119)
README installation examples now use `uv add` consistently, matching the
repo's `uv`-based Python workflow. The top-level README also gets a
cleaner quickstart and resource section with current links for docs,
community, learning, and contribution guidance.

## Changes
- Replaced `pip install` snippets with `uv add` across package quick
install docs, including the Hugging Face extras and
`sentence-transformers` upgrade examples.
- Updated the top-level quickstart to show only `uv add langchain` and
refreshed the example model to `openai:gpt-5.5`.
- Pointed the LangGraph orchestration link at the LangGraph GitHub
repository.
- Consolidated top-level documentation and additional-resource links
under a single `Resources` section covering docs, ecosystem overview,
API reference, discussions, Academy, contributing, and the Code of
Conduct.
- Added LangChain Academy and Code of Conduct links to package README
resource sections.
2026-06-12 17:38:22 -04:00
Mason Daugherty
86ce95afc2 test(core,langchain): update tests for explicit deserialization allowlists (#38118)
Core serialization tests now opt into the object allowlists they rely on
instead of assuming default deserialization permits core objects.
Compatibility tests that intentionally exercise deprecated runnable
streaming and history APIs also suppress the expected deprecation
warnings so they can keep covering those legacy paths cleanly.

## Changes
- Updated serialization and prompt round-trip tests to pass
`allowed_objects="core"` or targeted allowlists when loading
`AIMessage`, prompt templates, structured prompts, runnable maps, and
related core objects.
- Adjusted secret-injection regression coverage to keep testing
`secrets_from_env=True` behavior while explicitly allowing core
deserialization paths.
- Tightened prompt deserialization rejection tests so attribute-access
payloads are loaded only through the specific prompt-template allowlist
needed to reach validation.
- Added module-level warning filters around legacy runnable
compatibility coverage for `astream_log`,
`astream_events(version="v1")`, and `RunnableWithMessageHistory`.
- Bumped the `langchain` package's minimum `langgraph` dependency from
`1.2.4` to `1.2.5`.

## Testing
- Updated unit tests across core serialization, prompt, fake chat model,
runnable history, and runnable event coverage.
2026-06-12 16:49:14 -04:00
dependabot[bot]
8b7979c0a0 chore: bump tornado from 6.5.5 to 6.5.6 in /libs/partners/huggingface (#38113)
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.5.5 to
6.5.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst">tornado's
changelog</a>.</em></p>
<blockquote>
<h1>Release notes</h1>
<p>.. toctree::
:maxdepth: 2</p>
<p>releases/v6.5.7
releases/v6.5.6
releases/v6.5.5
releases/v6.5.4
releases/v6.5.3
releases/v6.5.2
releases/v6.5.1
releases/v6.5.0
releases/v6.4.2
releases/v6.4.1
releases/v6.4.0
releases/v6.3.3
releases/v6.3.2
releases/v6.3.1
releases/v6.3.0
releases/v6.2.0
releases/v6.1.0
releases/v6.0.4
releases/v6.0.3
releases/v6.0.2
releases/v6.0.1
releases/v6.0.0
releases/v5.1.1
releases/v5.1.0
releases/v5.0.2
releases/v5.0.1
releases/v5.0.0
releases/v4.5.3
releases/v4.5.2
releases/v4.5.1
releases/v4.5.0
releases/v4.4.3
releases/v4.4.2
releases/v4.4.1
releases/v4.4.0
releases/v4.3.0
releases/v4.2.1
releases/v4.2.0
releases/v4.1.0
releases/v4.0.2
releases/v4.0.1
releases/v4.0.0
releases/v3.2.2
releases/v3.2.1</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="aba2569f7e"><code>aba2569</code></a>
Merge pull request <a
href="https://redirect.github.com/tornadoweb/tornado/issues/3626">#3626</a>
from bdarnell/fixes-656</li>
<li><a
href="a24b260e0d"><code>a24b260</code></a>
httpclient_test: Accept an additional error message variant</li>
<li><a
href="a74240a702"><code>a74240a</code></a>
Release notes and version bump for 6.5.6.</li>
<li><a
href="e8fc7edb23"><code>e8fc7ed</code></a>
simple_httpclient: Strip auth headers on cross-origin redirects</li>
<li><a
href="96dc88c2a0"><code>96dc88c</code></a>
speedups: validate mask length</li>
<li><a
href="ff808b33ad"><code>ff808b3</code></a>
http1connection: Enforce max_body_size in _GzipMessageDelegate</li>
<li><a
href="ede4e37f93"><code>ede4e37</code></a>
auth: Correctly parse check_authentication response</li>
<li><a
href="1c178bef88"><code>1c178be</code></a>
Remove obsolete curl force_timeout workaround</li>
<li><a
href="c99d55bb6c"><code>c99d55b</code></a>
Replace deprecated pycurl IOCTLFUNCTION callback with SEEKFUNCTION</li>
<li><a
href="27614316ef"><code>2761431</code></a>
Merge pull request <a
href="https://redirect.github.com/tornadoweb/tornado/issues/3587">#3587</a>
from bdarnell/fix-link</li>
<li>Additional commits viewable in <a
href="https://github.com/tornadoweb/tornado/compare/v6.5.5...v6.5.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tornado&package-manager=uv&previous-version=6.5.5&new-version=6.5.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 15:04:50 -04:00
Mason Daugherty
4108c0738c release(core): 1.4.7 (#38111)
Bumps `langchain-core` to `1.4.7` for the next patch release and updates
downstream minimum `langchain-core` requirements so package locks
resolve against the new core version.

This also refreshes the runnable snapshots that embed `lc_versions`
metadata so the version consistency check continues to validate
checked-in artifacts.

Validated with `python libs/core/scripts/check_version.py`, `uv lock
--check` across package lockfiles, and the core runnable tests that own
the updated snapshots with local LangSmith tracing env disabled.
2026-06-12 14:54:25 -04:00
Mason Daugherty
8837163917 fix(core,partners): rename package version trace metadata (#38110)
Package-version trace metadata now uses the LangChain-owned
`metadata["lc_versions"]` convention instead of the user-owned
`metadata["versions"]` key. Metadata merging is narrowed so only
`lc_versions` accumulates nested package-version entries, while generic
nested metadata keeps normal last-writer-wins behavior.

## Changes
- Renamed `BaseLanguageModel._add_version()` trace metadata from
`versions` to `lc_versions`, including docstrings and the non-dict
replacement warning.
- Scoped `_merge_metadata_dicts()` nested-map accumulation to only
`lc_versions`; duplicate package entries remain last-writer-wins and
`lc_versions` mappings are copied defensively.
- Preserved user-owned `metadata["versions"]` semantics by keeping it
out of package-version tracking and generic nested metadata merging.
- Updated runnable snapshots and partner package metadata assertions
across Anthropic, DeepSeek, Fireworks, Groq, Hugging Face, MistralAI,
Ollama, OpenAI, OpenRouter, Perplexity, and xAI to expect `lc_versions`.

## Testing
- Added/adjusted core tests for `lc_versions` accumulation, duplicate
package overwrite behavior, non-dict `lc_versions` replacement,
defensive copying, and `metadata["versions"]` last-writer-wins behavior.
- Ran focused core and partner metadata tests plus Ruff checks for
changed areas.
2026-06-12 14:26:32 -04:00
langchain-model-profile-bot[bot]
8d7961b4b5 chore(model-profiles): refresh model profile data (#38100)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the `refresh_model_profiles` workflow.

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-06-12 14:23:45 -04:00
Nick Hollon
c9f98c1bcd release(anthropic): 1.4.6 (#38105) 2026-06-12 12:50:59 -04:00
Nick Hollon
dcaf7795a3 fix(langchain,anthropic): confine file-search results and tighten anthropic allowed_prefixes (#38106) 2026-06-12 12:47:23 -04:00
Mason Daugherty
5d20596d73 style(core,langchain,langchain-classic,partners): replace double backticks in docstrings (#38095)
Standardizes inline code markup in Python docstrings and comments by
replacing Sphinx-style double backticks with single-backtick Markdown.
The cleanup keeps existing code fences intact while aligning inline
references with the repo's docstring convention.

## Changes
- Converted inline code references in core prompt-loading docs and
LangSmith tracer comments, including `..`, `allow_dangerous_paths`, and
inheritable metadata keys.
- Normalized agent-related docstrings and comments around
`wrap_model_call`, `ExtendedModelResponse`, `Command`,
`create_structured_chat_agent`, and `DockerExecutionPolicy`.
- Updated partner package docstrings for inline references such as
`json_schema`, `ToolCall`, `apply_patch_call_output`, OpenRouter content
block keys, and Perplexity tool-call serialization.
- Cleaned test and helper docstrings that referenced command separators,
fake `resource` modules, stream event names, and xdist rate-limit
environment variables.
2026-06-12 00:17:26 -04:00
dependabot[bot]
fb55c6660a chore: bump langsmith from 0.8.9 to 0.8.14 in /libs/partners/huggingface (#38091)
Bumps [langsmith](https://github.com/langchain-ai/langsmith-sdk) from
0.8.9 to 0.8.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langsmith-sdk/releases">langsmith's
releases</a>.</em></p>
<blockquote>
<h2>v0.8.14</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: add deepagent compatibility smoke tests to Python and JS CI
[LSDK-214] by <a
href="https://github.com/QuentinBrosse"><code>@​QuentinBrosse</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2997">langchain-ai/langsmith-sdk#2997</a></li>
<li>chore(py): bump Python SDK to 0.8.14 by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3013">langchain-ai/langsmith-sdk#3013</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.13...v0.8.14">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.13...v0.8.14</a></p>
<h2>v0.8.13</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(py): type sandbox startup errors by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3004">langchain-ai/langsmith-sdk#3004</a></li>
<li>chore(py): bump Python SDK to 0.8.13 by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3012">langchain-ai/langsmith-sdk#3012</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.12...v0.8.13">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.12...v0.8.13</a></p>
<h2>v0.8.12</h2>
<h2>What's Changed</h2>
<ul>
<li>ci: protect _openapi_client from unauthorized changes by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2999">langchain-ai/langsmith-sdk#2999</a></li>
<li>fix: gemini double counting of over 200k tokens by <a
href="https://github.com/dqbd"><code>@​dqbd</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3003">langchain-ai/langsmith-sdk#3003</a></li>
<li>feat(python): cross-process OAuth refresh filesystem lock by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2988">langchain-ai/langsmith-sdk#2988</a></li>
<li>feat(js): cross-process OAuth refresh filesystem lock by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2989">langchain-ai/langsmith-sdk#2989</a></li>
<li>fix: avoid duplicate /v1 in hub URLs when endpoint includes /api/v1
by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3008">langchain-ai/langsmith-sdk#3008</a></li>
<li>chore: bump JS to 0.7.6 and Python to 0.8.12 by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3011">langchain-ai/langsmith-sdk#3011</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.11...v0.8.12">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.11...v0.8.12</a></p>
<h2>v0.8.11</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: match async feedback client to sync behavior [LSEN-206] by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3001">langchain-ai/langsmith-sdk#3001</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.10...v0.8.11">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.10...v0.8.11</a></p>
<h2>v0.8.10</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(sandbox): size the dockerfile-build sandbox via vCpus/memBytes
(js) by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2980">langchain-ai/langsmith-sdk#2980</a></li>
<li>feat(python): support trace_id and retry-on-NotFound in async
create_… by <a
href="https://github.com/baskaryan"><code>@​baskaryan</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2963">langchain-ai/langsmith-sdk#2963</a></li>
<li>feat(python): expose pairwise comparison URL on
ComparativeExperimentResults [LSE-2270] by <a
href="https://github.com/harisaiharish"><code>@​harisaiharish</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2975">langchain-ai/langsmith-sdk#2975</a></li>
<li>feat(js): exposed pairwise comparison URL on
ComparativeExperimentResults [LSE-2374] by <a
href="https://github.com/harisaiharish"><code>@​harisaiharish</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2981">langchain-ai/langsmith-sdk#2981</a></li>
<li>feat(python): expose LS_MESSAGE_VIEW_EXCLUDE constant [lso-2605] by
<a href="https://github.com/ybathula707"><code>@​ybathula707</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2982">langchain-ai/langsmith-sdk#2982</a></li>
<li>feat: support JS prompt commit tags by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2987">langchain-ai/langsmith-sdk#2987</a></li>
<li>fix(lint): exclude _openapi_client from ruff by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2993">langchain-ai/langsmith-sdk#2993</a></li>
<li>chore: sync langsmith_api by <a
href="https://github.com/langtions-bot"><code>@​langtions-bot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2911">langchain-ai/langsmith-sdk#2911</a></li>
<li>fix(lint): exclude _openapi_client from mypy by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2995">langchain-ai/langsmith-sdk#2995</a></li>
<li>chore: sync langsmith_api by <a
href="https://github.com/langtions-bot"><code>@​langtions-bot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2994">langchain-ai/langsmith-sdk#2994</a></li>
<li>Add AWS auth proxy helpers to Python SDK by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2991">langchain-ai/langsmith-sdk#2991</a></li>
<li>Add AWS auth proxy helpers to JS SDK by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2992">langchain-ai/langsmith-sdk#2992</a></li>
<li>feat(evaluation): adding examples and repetitions to create tracer
sessions calls by <a
href="https://github.com/shamikkarkhanis"><code>@​shamikkarkhanis</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2954">langchain-ai/langsmith-sdk#2954</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3ac6bb8a5c"><code>3ac6bb8</code></a>
chore(py): bump Python SDK to 0.8.14 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3013">#3013</a>)</li>
<li><a
href="36fe845634"><code>36fe845</code></a>
feat: add deepagent compatibility smoke tests to Python and JS CI
[LSDK-214] ...</li>
<li><a
href="572014cd2c"><code>572014c</code></a>
chore(py): bump Python SDK to 0.8.13 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3012">#3012</a>)</li>
<li><a
href="03f3b8c741"><code>03f3b8c</code></a>
fix(py): type sandbox startup errors (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3004">#3004</a>)</li>
<li><a
href="607a3b6559"><code>607a3b6</code></a>
chore: bump JS to 0.7.6 and Python to 0.8.12 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3011">#3011</a>)</li>
<li><a
href="fb6b283a8e"><code>fb6b283</code></a>
fix: avoid duplicate /v1 in hub URLs when endpoint includes /api/v1 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3008">#3008</a>)</li>
<li><a
href="faaaa13e2c"><code>faaaa13</code></a>
feat(js): cross-process OAuth refresh filesystem lock (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2989">#2989</a>)</li>
<li><a
href="cba1712f00"><code>cba1712</code></a>
feat(python): cross-process OAuth refresh filesystem lock (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2988">#2988</a>)</li>
<li><a
href="c4408f44c8"><code>c4408f4</code></a>
fix: gemini double counting of over 200k tokens (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3003">#3003</a>)</li>
<li><a
href="cec161e7c5"><code>cec161e</code></a>
ci: protect _openapi_client from unauthorized changes (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2999">#2999</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.9...v0.8.14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langsmith&package-manager=uv&previous-version=0.8.9&new-version=0.8.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-11 21:44:50 -04:00
dependabot[bot]
51daae5c13 chore: bump langsmith from 0.8.9 to 0.8.14 in /libs/partners/chroma (#38092)
Bumps [langsmith](https://github.com/langchain-ai/langsmith-sdk) from
0.8.9 to 0.8.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langsmith-sdk/releases">langsmith's
releases</a>.</em></p>
<blockquote>
<h2>v0.8.14</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: add deepagent compatibility smoke tests to Python and JS CI
[LSDK-214] by <a
href="https://github.com/QuentinBrosse"><code>@​QuentinBrosse</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2997">langchain-ai/langsmith-sdk#2997</a></li>
<li>chore(py): bump Python SDK to 0.8.14 by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3013">langchain-ai/langsmith-sdk#3013</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.13...v0.8.14">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.13...v0.8.14</a></p>
<h2>v0.8.13</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(py): type sandbox startup errors by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3004">langchain-ai/langsmith-sdk#3004</a></li>
<li>chore(py): bump Python SDK to 0.8.13 by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3012">langchain-ai/langsmith-sdk#3012</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.12...v0.8.13">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.12...v0.8.13</a></p>
<h2>v0.8.12</h2>
<h2>What's Changed</h2>
<ul>
<li>ci: protect _openapi_client from unauthorized changes by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2999">langchain-ai/langsmith-sdk#2999</a></li>
<li>fix: gemini double counting of over 200k tokens by <a
href="https://github.com/dqbd"><code>@​dqbd</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3003">langchain-ai/langsmith-sdk#3003</a></li>
<li>feat(python): cross-process OAuth refresh filesystem lock by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2988">langchain-ai/langsmith-sdk#2988</a></li>
<li>feat(js): cross-process OAuth refresh filesystem lock by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2989">langchain-ai/langsmith-sdk#2989</a></li>
<li>fix: avoid duplicate /v1 in hub URLs when endpoint includes /api/v1
by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3008">langchain-ai/langsmith-sdk#3008</a></li>
<li>chore: bump JS to 0.7.6 and Python to 0.8.12 by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3011">langchain-ai/langsmith-sdk#3011</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.11...v0.8.12">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.11...v0.8.12</a></p>
<h2>v0.8.11</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: match async feedback client to sync behavior [LSEN-206] by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3001">langchain-ai/langsmith-sdk#3001</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.10...v0.8.11">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.10...v0.8.11</a></p>
<h2>v0.8.10</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(sandbox): size the dockerfile-build sandbox via vCpus/memBytes
(js) by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2980">langchain-ai/langsmith-sdk#2980</a></li>
<li>feat(python): support trace_id and retry-on-NotFound in async
create_… by <a
href="https://github.com/baskaryan"><code>@​baskaryan</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2963">langchain-ai/langsmith-sdk#2963</a></li>
<li>feat(python): expose pairwise comparison URL on
ComparativeExperimentResults [LSE-2270] by <a
href="https://github.com/harisaiharish"><code>@​harisaiharish</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2975">langchain-ai/langsmith-sdk#2975</a></li>
<li>feat(js): exposed pairwise comparison URL on
ComparativeExperimentResults [LSE-2374] by <a
href="https://github.com/harisaiharish"><code>@​harisaiharish</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2981">langchain-ai/langsmith-sdk#2981</a></li>
<li>feat(python): expose LS_MESSAGE_VIEW_EXCLUDE constant [lso-2605] by
<a href="https://github.com/ybathula707"><code>@​ybathula707</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2982">langchain-ai/langsmith-sdk#2982</a></li>
<li>feat: support JS prompt commit tags by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2987">langchain-ai/langsmith-sdk#2987</a></li>
<li>fix(lint): exclude _openapi_client from ruff by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2993">langchain-ai/langsmith-sdk#2993</a></li>
<li>chore: sync langsmith_api by <a
href="https://github.com/langtions-bot"><code>@​langtions-bot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2911">langchain-ai/langsmith-sdk#2911</a></li>
<li>fix(lint): exclude _openapi_client from mypy by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2995">langchain-ai/langsmith-sdk#2995</a></li>
<li>chore: sync langsmith_api by <a
href="https://github.com/langtions-bot"><code>@​langtions-bot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2994">langchain-ai/langsmith-sdk#2994</a></li>
<li>Add AWS auth proxy helpers to Python SDK by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2991">langchain-ai/langsmith-sdk#2991</a></li>
<li>Add AWS auth proxy helpers to JS SDK by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2992">langchain-ai/langsmith-sdk#2992</a></li>
<li>feat(evaluation): adding examples and repetitions to create tracer
sessions calls by <a
href="https://github.com/shamikkarkhanis"><code>@​shamikkarkhanis</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2954">langchain-ai/langsmith-sdk#2954</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3ac6bb8a5c"><code>3ac6bb8</code></a>
chore(py): bump Python SDK to 0.8.14 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3013">#3013</a>)</li>
<li><a
href="36fe845634"><code>36fe845</code></a>
feat: add deepagent compatibility smoke tests to Python and JS CI
[LSDK-214] ...</li>
<li><a
href="572014cd2c"><code>572014c</code></a>
chore(py): bump Python SDK to 0.8.13 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3012">#3012</a>)</li>
<li><a
href="03f3b8c741"><code>03f3b8c</code></a>
fix(py): type sandbox startup errors (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3004">#3004</a>)</li>
<li><a
href="607a3b6559"><code>607a3b6</code></a>
chore: bump JS to 0.7.6 and Python to 0.8.12 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3011">#3011</a>)</li>
<li><a
href="fb6b283a8e"><code>fb6b283</code></a>
fix: avoid duplicate /v1 in hub URLs when endpoint includes /api/v1 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3008">#3008</a>)</li>
<li><a
href="faaaa13e2c"><code>faaaa13</code></a>
feat(js): cross-process OAuth refresh filesystem lock (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2989">#2989</a>)</li>
<li><a
href="cba1712f00"><code>cba1712</code></a>
feat(python): cross-process OAuth refresh filesystem lock (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2988">#2988</a>)</li>
<li><a
href="c4408f44c8"><code>c4408f4</code></a>
fix: gemini double counting of over 200k tokens (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3003">#3003</a>)</li>
<li><a
href="cec161e7c5"><code>cec161e</code></a>
ci: protect _openapi_client from unauthorized changes (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2999">#2999</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.9...v0.8.14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langsmith&package-manager=uv&previous-version=0.8.9&new-version=0.8.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-11 21:44:42 -04:00
dependabot[bot]
70e9579e43 chore: bump langsmith from 0.8.9 to 0.8.14 in /libs/partners/fireworks (#38093)
Bumps [langsmith](https://github.com/langchain-ai/langsmith-sdk) from
0.8.9 to 0.8.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langsmith-sdk/releases">langsmith's
releases</a>.</em></p>
<blockquote>
<h2>v0.8.14</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: add deepagent compatibility smoke tests to Python and JS CI
[LSDK-214] by <a
href="https://github.com/QuentinBrosse"><code>@​QuentinBrosse</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2997">langchain-ai/langsmith-sdk#2997</a></li>
<li>chore(py): bump Python SDK to 0.8.14 by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3013">langchain-ai/langsmith-sdk#3013</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.13...v0.8.14">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.13...v0.8.14</a></p>
<h2>v0.8.13</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(py): type sandbox startup errors by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3004">langchain-ai/langsmith-sdk#3004</a></li>
<li>chore(py): bump Python SDK to 0.8.13 by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3012">langchain-ai/langsmith-sdk#3012</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.12...v0.8.13">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.12...v0.8.13</a></p>
<h2>v0.8.12</h2>
<h2>What's Changed</h2>
<ul>
<li>ci: protect _openapi_client from unauthorized changes by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2999">langchain-ai/langsmith-sdk#2999</a></li>
<li>fix: gemini double counting of over 200k tokens by <a
href="https://github.com/dqbd"><code>@​dqbd</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3003">langchain-ai/langsmith-sdk#3003</a></li>
<li>feat(python): cross-process OAuth refresh filesystem lock by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2988">langchain-ai/langsmith-sdk#2988</a></li>
<li>feat(js): cross-process OAuth refresh filesystem lock by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2989">langchain-ai/langsmith-sdk#2989</a></li>
<li>fix: avoid duplicate /v1 in hub URLs when endpoint includes /api/v1
by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3008">langchain-ai/langsmith-sdk#3008</a></li>
<li>chore: bump JS to 0.7.6 and Python to 0.8.12 by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3011">langchain-ai/langsmith-sdk#3011</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.11...v0.8.12">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.11...v0.8.12</a></p>
<h2>v0.8.11</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: match async feedback client to sync behavior [LSEN-206] by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3001">langchain-ai/langsmith-sdk#3001</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.10...v0.8.11">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.10...v0.8.11</a></p>
<h2>v0.8.10</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(sandbox): size the dockerfile-build sandbox via vCpus/memBytes
(js) by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2980">langchain-ai/langsmith-sdk#2980</a></li>
<li>feat(python): support trace_id and retry-on-NotFound in async
create_… by <a
href="https://github.com/baskaryan"><code>@​baskaryan</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2963">langchain-ai/langsmith-sdk#2963</a></li>
<li>feat(python): expose pairwise comparison URL on
ComparativeExperimentResults [LSE-2270] by <a
href="https://github.com/harisaiharish"><code>@​harisaiharish</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2975">langchain-ai/langsmith-sdk#2975</a></li>
<li>feat(js): exposed pairwise comparison URL on
ComparativeExperimentResults [LSE-2374] by <a
href="https://github.com/harisaiharish"><code>@​harisaiharish</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2981">langchain-ai/langsmith-sdk#2981</a></li>
<li>feat(python): expose LS_MESSAGE_VIEW_EXCLUDE constant [lso-2605] by
<a href="https://github.com/ybathula707"><code>@​ybathula707</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2982">langchain-ai/langsmith-sdk#2982</a></li>
<li>feat: support JS prompt commit tags by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2987">langchain-ai/langsmith-sdk#2987</a></li>
<li>fix(lint): exclude _openapi_client from ruff by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2993">langchain-ai/langsmith-sdk#2993</a></li>
<li>chore: sync langsmith_api by <a
href="https://github.com/langtions-bot"><code>@​langtions-bot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2911">langchain-ai/langsmith-sdk#2911</a></li>
<li>fix(lint): exclude _openapi_client from mypy by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2995">langchain-ai/langsmith-sdk#2995</a></li>
<li>chore: sync langsmith_api by <a
href="https://github.com/langtions-bot"><code>@​langtions-bot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2994">langchain-ai/langsmith-sdk#2994</a></li>
<li>Add AWS auth proxy helpers to Python SDK by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2991">langchain-ai/langsmith-sdk#2991</a></li>
<li>Add AWS auth proxy helpers to JS SDK by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2992">langchain-ai/langsmith-sdk#2992</a></li>
<li>feat(evaluation): adding examples and repetitions to create tracer
sessions calls by <a
href="https://github.com/shamikkarkhanis"><code>@​shamikkarkhanis</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2954">langchain-ai/langsmith-sdk#2954</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3ac6bb8a5c"><code>3ac6bb8</code></a>
chore(py): bump Python SDK to 0.8.14 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3013">#3013</a>)</li>
<li><a
href="36fe845634"><code>36fe845</code></a>
feat: add deepagent compatibility smoke tests to Python and JS CI
[LSDK-214] ...</li>
<li><a
href="572014cd2c"><code>572014c</code></a>
chore(py): bump Python SDK to 0.8.13 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3012">#3012</a>)</li>
<li><a
href="03f3b8c741"><code>03f3b8c</code></a>
fix(py): type sandbox startup errors (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3004">#3004</a>)</li>
<li><a
href="607a3b6559"><code>607a3b6</code></a>
chore: bump JS to 0.7.6 and Python to 0.8.12 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3011">#3011</a>)</li>
<li><a
href="fb6b283a8e"><code>fb6b283</code></a>
fix: avoid duplicate /v1 in hub URLs when endpoint includes /api/v1 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3008">#3008</a>)</li>
<li><a
href="faaaa13e2c"><code>faaaa13</code></a>
feat(js): cross-process OAuth refresh filesystem lock (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2989">#2989</a>)</li>
<li><a
href="cba1712f00"><code>cba1712</code></a>
feat(python): cross-process OAuth refresh filesystem lock (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2988">#2988</a>)</li>
<li><a
href="c4408f44c8"><code>c4408f4</code></a>
fix: gemini double counting of over 200k tokens (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3003">#3003</a>)</li>
<li><a
href="cec161e7c5"><code>cec161e</code></a>
ci: protect _openapi_client from unauthorized changes (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2999">#2999</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.9...v0.8.14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langsmith&package-manager=uv&previous-version=0.8.9&new-version=0.8.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-11 21:44:30 -04:00
dependabot[bot]
6c0e9af324 chore: bump langsmith from 0.8.9 to 0.8.14 in /libs/partners/xai (#38094)
Bumps [langsmith](https://github.com/langchain-ai/langsmith-sdk) from
0.8.9 to 0.8.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langsmith-sdk/releases">langsmith's
releases</a>.</em></p>
<blockquote>
<h2>v0.8.14</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: add deepagent compatibility smoke tests to Python and JS CI
[LSDK-214] by <a
href="https://github.com/QuentinBrosse"><code>@​QuentinBrosse</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2997">langchain-ai/langsmith-sdk#2997</a></li>
<li>chore(py): bump Python SDK to 0.8.14 by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3013">langchain-ai/langsmith-sdk#3013</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.13...v0.8.14">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.13...v0.8.14</a></p>
<h2>v0.8.13</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(py): type sandbox startup errors by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3004">langchain-ai/langsmith-sdk#3004</a></li>
<li>chore(py): bump Python SDK to 0.8.13 by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3012">langchain-ai/langsmith-sdk#3012</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.12...v0.8.13">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.12...v0.8.13</a></p>
<h2>v0.8.12</h2>
<h2>What's Changed</h2>
<ul>
<li>ci: protect _openapi_client from unauthorized changes by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2999">langchain-ai/langsmith-sdk#2999</a></li>
<li>fix: gemini double counting of over 200k tokens by <a
href="https://github.com/dqbd"><code>@​dqbd</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3003">langchain-ai/langsmith-sdk#3003</a></li>
<li>feat(python): cross-process OAuth refresh filesystem lock by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2988">langchain-ai/langsmith-sdk#2988</a></li>
<li>feat(js): cross-process OAuth refresh filesystem lock by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2989">langchain-ai/langsmith-sdk#2989</a></li>
<li>fix: avoid duplicate /v1 in hub URLs when endpoint includes /api/v1
by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3008">langchain-ai/langsmith-sdk#3008</a></li>
<li>chore: bump JS to 0.7.6 and Python to 0.8.12 by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3011">langchain-ai/langsmith-sdk#3011</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.11...v0.8.12">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.11...v0.8.12</a></p>
<h2>v0.8.11</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: match async feedback client to sync behavior [LSEN-206] by <a
href="https://github.com/vishnu-ssuresh"><code>@​vishnu-ssuresh</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/3001">langchain-ai/langsmith-sdk#3001</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.10...v0.8.11">https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.10...v0.8.11</a></p>
<h2>v0.8.10</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(sandbox): size the dockerfile-build sandbox via vCpus/memBytes
(js) by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2980">langchain-ai/langsmith-sdk#2980</a></li>
<li>feat(python): support trace_id and retry-on-NotFound in async
create_… by <a
href="https://github.com/baskaryan"><code>@​baskaryan</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2963">langchain-ai/langsmith-sdk#2963</a></li>
<li>feat(python): expose pairwise comparison URL on
ComparativeExperimentResults [LSE-2270] by <a
href="https://github.com/harisaiharish"><code>@​harisaiharish</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2975">langchain-ai/langsmith-sdk#2975</a></li>
<li>feat(js): exposed pairwise comparison URL on
ComparativeExperimentResults [LSE-2374] by <a
href="https://github.com/harisaiharish"><code>@​harisaiharish</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2981">langchain-ai/langsmith-sdk#2981</a></li>
<li>feat(python): expose LS_MESSAGE_VIEW_EXCLUDE constant [lso-2605] by
<a href="https://github.com/ybathula707"><code>@​ybathula707</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2982">langchain-ai/langsmith-sdk#2982</a></li>
<li>feat: support JS prompt commit tags by <a
href="https://github.com/langchain-infra"><code>@​langchain-infra</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2987">langchain-ai/langsmith-sdk#2987</a></li>
<li>fix(lint): exclude _openapi_client from ruff by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2993">langchain-ai/langsmith-sdk#2993</a></li>
<li>chore: sync langsmith_api by <a
href="https://github.com/langtions-bot"><code>@​langtions-bot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2911">langchain-ai/langsmith-sdk#2911</a></li>
<li>fix(lint): exclude _openapi_client from mypy by <a
href="https://github.com/KiewanVillatel"><code>@​KiewanVillatel</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2995">langchain-ai/langsmith-sdk#2995</a></li>
<li>chore: sync langsmith_api by <a
href="https://github.com/langtions-bot"><code>@​langtions-bot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2994">langchain-ai/langsmith-sdk#2994</a></li>
<li>Add AWS auth proxy helpers to Python SDK by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2991">langchain-ai/langsmith-sdk#2991</a></li>
<li>Add AWS auth proxy helpers to JS SDK by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2992">langchain-ai/langsmith-sdk#2992</a></li>
<li>feat(evaluation): adding examples and repetitions to create tracer
sessions calls by <a
href="https://github.com/shamikkarkhanis"><code>@​shamikkarkhanis</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2954">langchain-ai/langsmith-sdk#2954</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3ac6bb8a5c"><code>3ac6bb8</code></a>
chore(py): bump Python SDK to 0.8.14 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3013">#3013</a>)</li>
<li><a
href="36fe845634"><code>36fe845</code></a>
feat: add deepagent compatibility smoke tests to Python and JS CI
[LSDK-214] ...</li>
<li><a
href="572014cd2c"><code>572014c</code></a>
chore(py): bump Python SDK to 0.8.13 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3012">#3012</a>)</li>
<li><a
href="03f3b8c741"><code>03f3b8c</code></a>
fix(py): type sandbox startup errors (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3004">#3004</a>)</li>
<li><a
href="607a3b6559"><code>607a3b6</code></a>
chore: bump JS to 0.7.6 and Python to 0.8.12 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3011">#3011</a>)</li>
<li><a
href="fb6b283a8e"><code>fb6b283</code></a>
fix: avoid duplicate /v1 in hub URLs when endpoint includes /api/v1 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3008">#3008</a>)</li>
<li><a
href="faaaa13e2c"><code>faaaa13</code></a>
feat(js): cross-process OAuth refresh filesystem lock (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2989">#2989</a>)</li>
<li><a
href="cba1712f00"><code>cba1712</code></a>
feat(python): cross-process OAuth refresh filesystem lock (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2988">#2988</a>)</li>
<li><a
href="c4408f44c8"><code>c4408f4</code></a>
fix: gemini double counting of over 200k tokens (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/3003">#3003</a>)</li>
<li><a
href="cec161e7c5"><code>cec161e</code></a>
ci: protect _openapi_client from unauthorized changes (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2999">#2999</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.8.9...v0.8.14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langsmith&package-manager=uv&previous-version=0.8.9&new-version=0.8.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-11 21:44:21 -04:00
Mason Daugherty
95d1633341 test(openai): use gpt-4o for image token counting (#38089)
Image token counting integration coverage is pinned back to `gpt-4o`,
whose usage metadata matches the local vision token estimator. A recent
model refresh moved these checks to `gpt-4.1-mini`, which reports
different live image token usage and broke the exact equality
assertions.
2026-06-11 20:27:18 -04:00
Mason Daugherty
05cc55f1bc release(core): 1.4.6 (#38061) 2026-06-11 02:58:40 -04:00
Mason Daugherty
447663fd8b feat(partners): expose package versions for remaining partners (#38060)
Chroma, Exa, Nomic, and Qdrant now expose package `__version__` values
through package-local `_version.py` modules, matching the version-file
pattern used by the other partner packages. Each package also gets a
`check_version` target so release version drift between `pyproject.toml`
and runtime exports is caught consistently.
2026-06-11 02:37:04 -04:00
Mason Daugherty
948f6cc58c feat(core,partners): add package version tracking to tracing metadata (#35295)
Following on the heels of #35293

TODO:
- Packages outside of this repo (e.g. LiteLLM, Nvidia, Google, AWS)

---

## Summary

Surface partner package versions in `metadata.versions` on LangSmith
traces. Mirrors the JS SDK's `_addVersion()` pattern
([langchainjs#10106](https://github.com/langchain-ai/langchainjs/pull/10106)).

Each model constructor records its package version via `_add_version()`
on `BaseLanguageModel`. The version dict accumulates through the class
hierarchy — `langchain-core` is added in
`BaseLanguageModel.model_post_init`, `langchain-openai` in
`BaseChatOpenAI._set_openai_chat_version`, and each leaf partner in its
uniquely-named `model_validator`. Traces end up with:

```json
{
  "metadata": {
    "versions": {
      "langchain-core": "1.4.5",
      "langchain-openai": "1.3.0",
      "langchain-xai": "1.2.2"
    }
  }
}
```

### Changes

- `BaseLanguageModel._add_version(pkg, version)` — appends to
`self.metadata["versions"]`; accepts any `Mapping` type; emits a warning
if a non-mapping value is found and replaced
- `BaseLanguageModel.model_post_init` — adds `langchain-core` version;
calls `super()` for MRO safety
- `_merge_metadata_dicts` — one-level-deep (non-recursive) merge for
nested dict metadata keys
- `CallbackManager.add_metadata` — uses `_merge_metadata_dicts` instead
of flat `dict.update()` so nested metadata dicts (like `versions`)
coexist rather than clobber
- `merge_configs` — uses `_merge_metadata_dicts` for config merging

**Partners:**
- Each now calls `self._add_version("langchain-<pkg>", __version__)`

### Design decisions

- **Constructor-based, not `_get_ls_params`-based** — versions flow
through `self.metadata` (local metadata on traces), not through
`LangSmithParams`. This matches JS and makes child-class version
inheritance automatic (no merge/clobber issues).
- **`versions` is local (non-inheritable) metadata** — `self.metadata`
is passed to `CallbackManager.configure` as `local_metadata`
(`add_metadata(..., inherit=False)`), so `versions` is attached **once
per chat-model run** and is **not** propagated to child runs or
duplicated onto every streaming chunk. This is intentionally the
opposite of the inheritable-per-chunk metadata that #36588 was reducing
for performance — `versions` does not regress that path.
- **`add_metadata` deep-merge is a correctness fix, not just for
versions** — previously `add_metadata`/`merge_configs` did a flat
top-level `dict.update`/spread, so any nested metadata dict baked into a
config (e.g. via `.with_config({"metadata": {...}})`) would be wholly
replaced when a caller also passed `metadata`. `_merge_metadata_dicts`
merges one level deep so user-provided `config.metadata.versions` and
model-set `versions` coexist instead of clobbering. The merge runs once
per `configure` (not per chunk), so it is off the streaming hot path.
- **One level deep only** — `_merge_metadata_dicts` is deliberately
*not* a recursive deep merge; values nested more than one level are
last-writer-wins. This covers the `versions` case without the
ambiguity/cost of arbitrary-depth merging.
- **Warn on non-dict `metadata["versions"]`** — if a user sets
`metadata={"versions": "some-string"}`, `_add_version` emits a warning
and replaces the value with the version dict rather than silently
discarding user data or crashing. This is a soft breaking change for
anyone who previously stored non-dict values at this key.

### Follow-ups (tracked separately, out of scope here)

- JS `mergeConfigs` still flat-spreads nested metadata, so
`metadata.versions` can still clobber on the JS side until an equivalent
deep-merge lands.

---

Made by [Open SWE](https://openswe.vercel.app)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-06-11 02:23:19 -04:00
Mason Daugherty
86428c63ac fix(core,openai): normalize v1 streamed tool calls (#35983)
OpenAI Chat Completions streaming has a v1 normalization gap when tool
calls are streamed.

When users opt into `output_version="v1"`, `.content_blocks` is expected
to be the normalized cross-provider view of the message. For OpenAI Chat
Completions streams, though, chunks still carry raw string `content`
plus side-channel `tool_call_chunks` / `tool_calls`.

Practically, an OpenAI stream chunk can look like this internally:

```python
AIMessageChunk(
    content="",
    tool_call_chunks=[
        {
            "name": "get_weather",
            "args": '{"location": "SF"}',
            "id": "call_123",
            "index": 0,
            "type": "tool_call_chunk",
        }
    ],
    response_metadata={"model_provider": "openai", "output_version": "v1"},
)
```

That is not already-normalized v1 content like this:

```python
AIMessageChunk(
    content=[
        {
            "type": "tool_call_chunk",
            "name": "get_weather",
            "args": '{"location": "SF"}',
            "id": "call_123",
            "index": 0,
        }
    ],
)
```

Because `.content_blocks` currently short-circuits solely on
`output_version="v1"`, it can return the raw string/empty list directly
instead of running the OpenAI translator that incorporates
`tool_call_chunks` / `tool_calls` into normalized v1 blocks.

In practice, a streamed OpenAI tool call can be parsed successfully into
`tool_calls`, but still be missing from the final aggregated
`.content_blocks`. Downstream code that consumes the v1 block interface
then sees no `tool_call` block and must know to inspect OpenAI-specific
chunk fields instead.

User story:

> As a LangChain user streaming OpenAI Chat Completions with bound tools
and `output_version="v1"`, I need the final aggregated message's
`.content_blocks` to include normalized `tool_call` blocks, so that code
written against the v1 content-block interface handles streamed tool
calls consistently across providers.

Expected final aggregated view:

```python
message.content_blocks == [
    {
        "type": "tool_call",
        "name": "get_weather",
        "args": {"location": "SF"},
        "id": "call_123",
    }
]
```

Root causes:

1. The usage-only Chat Completions chunk uses `content=[]` in v1 mode
while normal streaming chunks use `content=""`, creating inconsistent
content types during chunk aggregation.
2. `AIMessage.content_blocks` and `AIMessageChunk.content_blocks` treat
any `output_version="v1"` message as already-normalized, even when
`content` is still raw string content from Chat Completions.
3. Content-bearing OpenAI stream chunks do not carry
`output_version="v1"`, so the final merged chunk may not reliably take
the v1 normalization path.

Changes:

- Keep usage-only Chat Completions chunks as `content=""` instead of
overriding to `[]`, so streaming chunks merge consistently.
- Propagate `output_version="v1"` to content-bearing chunks.
- Only short-circuit v1 `.content_blocks` when `content` is already a
list of blocks; otherwise fall through to the provider translator.
- Add regression tests covering string-content v1 fallback, usage-only
chunk content consistency, and streamed tool calls appearing as
normalized final v1 blocks.
2026-06-11 00:51:50 -04:00
Christophe Bornet
1de100f278 chore(infra): bump mypy to 2.1 and unify type-check config across the monorepo (#36470)
Originally a narrow bump of mypy to `1.20` in four packages. Expanded to
get the whole monorepo onto a single, current mypy and a consistent
type-check configuration, so contributors no longer hit different mypy
versions and divergent behavior depending on which package they touch.

### What changed

- **Unified the mypy pin to `>=2.1.0,<2.2.0`** in every mypy-using
package (6 libs + 14 partners), replacing the previously scattered pins
(`1.10`/`1.17`/`1.18`/`1.19`/`1.20`, with assorted upper bounds).
- **Unified the `[tool.mypy]` base per tier:**
- libs: `plugins = ["pydantic.mypy"]`, `strict = true`,
`enable_error_code = "deprecated"`, `warn_unreachable = true`
  - partners: `disallow_untyped_defs = true`
- Normalized style (`disallow_untyped_defs = "True"` string → bool,
quote/key consistency).
- **Fixed the 20 real errors** mypy 2.1 surfaces: `redundant-cast` from
improved narrowing (`core`, `langchain-classic`), a `var-annotated` for
`_LOGGED`, a return-type widening in `langchain-groq`'s
`_convert_from_v1_to_groq` (it can legitimately return a bare `str`),
and stale `type-arg`/`unused-ignore` in `langchain-model-profiles`
tests.

### Deliberate non-uniformity (documented inline in the relevant
`pyproject.toml`s)

Going fully byte-identical would surface ~196 additional errors that are
*not* real bugs, so two settings are kept package-appropriate:

- **`warn_unreachable`** is enabled on every strict lib **except
`core`**, where it false-flags intentional defensive code — including
the SSRF / IP-policy guards in `_security/` — as unreachable.
- **`pydantic.mypy` plugin** is used only on `anthropic` and
`perplexity` (their code is authored against it and reports ~99/~132
errors without it). It is *not* added to the other partners, where it
only flags the public alias constructor API (e.g. `ChatGroq(model=...)`)
in tests rather than finding bugs.
- **`ollama`** is left on its `ty` type checker; it does not use mypy.

---------

Co-authored-by: Mason Daugherty <github@mdrxy.com>
2026-06-11 00:24:59 -04:00
Mason Daugherty
43880362d8 feat(standard-tests): validate tool call chunks during streaming (#34707)
As a LangChain user streaming a tool-calling model, I expect each
streamed chunk to expose structured `tool_call_chunk` content blocks so
I can render or process tool calls live, instead of waiting for the
final aggregated message.

This adds `tool_call_streaming` to `ModelProfile` and uses it in the
standard chat-model tool-calling tests. When a model profile opts in,
`test_tool_calling` and `test_tool_calling_async` now validate that at
least one streamed chunk includes a `tool_call_chunk` block via
`content_blocks`, while preserving the existing final-message
validation.

This keeps the contract profile-gated so providers can opt in once their
streaming chunk shape is verified. This PR opts in the providers
verified by smoke testing with straightforward profile coverage: OpenAI,
Anthropic, Fireworks, HuggingFace, OpenRouter, DeepSeek, and xAI. The
generated profile artifacts are refreshed so runtime profiles expose the
new capability flag.

Perplexity Responses also passed the smoke test, but its current profile
data is for the `sonar` family while the Responses smoke path used a
routed model string. That profile strategy is left as follow-up.
MistralAI currently streams `.tool_call_chunks`, but its content-block
translator exposes a complete `tool_call` block instead of
`tool_call_chunk`, so it also stays out of this flag until that
integration is fixed.
2026-06-10 22:29:02 -04:00
Mason Daugherty
c16499c339 chore(partners): bump locks (#38052) 2026-06-10 21:41:52 -04:00
Mason Daugherty
6b9e22dbbc fix(langchain): tighten structured output model fallbacks (#38042)
Provider-native structured output fallback detection now uses bounded
model-name patterns instead of broad substring checks, reducing false
positives for unrelated model IDs. The model examples and test fixtures
across OpenAI/OpenRouter-facing code were refreshed around current
OpenAI model families while preserving shipped defaults.

## Changes
- Tightened `FALLBACK_MODELS_WITH_STRUCTURED_OUTPUT` from loose string
fragments to regex patterns, with `_supports_provider_strategy` matching
full model-name segments instead of arbitrary substrings.
- Expanded structured-output fallback coverage for newer OpenAI,
Anthropic, and xAI/Grok model families, including `gpt-5.x`, newer
Claude 4/5-style names, and `grok-build`.
- Reused `_attempt_infer_model_provider` in provider tool search routing
so `_provider_from_model_name` follows the same provider inference
behavior as `init_chat_model`.
- Suppressed irrelevant provider-inference deprecation warnings during
provider tool search registry lookup.
- Refreshed OpenAI, Azure OpenAI, OpenRouter, core metadata, and example
model references from older fixtures like `gpt-4`, `gpt-4o`, `o1`, and
`o4-mini` to current test/profile models such as `gpt-5.5`,
`gpt-5-nano`, and `gpt-4.1-mini`.
- Removed outdated OpenAI test assumptions around legacy `o1` behavior
and narrowed legacy structured-output checks to explicitly legacy model
names.
2026-06-10 21:18:14 -04:00
Mason Daugherty
fcaa61636e feat(mistralai): support stop sequences (#38047)
`ChatMistralAI` now supports `stop` sequences.

Previously, a `stop` value passed to the model was silently discarded:
the code carried a stale "not yet supported" note, dropped the parameter
before the request, and logged a warning. Mistral's chat completions API
does accept `stop` (a string or list of strings, up to 4 sequences), so
anyone setting `stop` and expecting generation to halt was getting no
effect.

Now `stop` is a first-class parameter. It can be set on the constructor
(`ChatMistralAI(stop=[...])`) or per call (`model.invoke(prompt,
stop=[...])`) and is forwarded to the API. A per-call value overrides
the instance default, and an empty list is treated as "no stop
sequences" — omitted from the request rather than sent as an empty array
(which the API rejects).

Verified against the live Mistral API: with `stop=["5"]`, "Count from 1
to 10" returns `1 2 3 4 ` instead of the full sequence. The 422
`extra_forbidden` response the API returns for genuinely unknown fields
confirms `stop` is a real schema field, not silently ignored.

This PR also folds in some test hygiene: the base-URL env test uses
`monkeypatch.setenv` so `MISTRAL_BASE_URL=boo` no longer leaks into
later serialization tests, and `test_extra_kwargs` asserts the
intentional unknown-kwarg warning with `pytest.warns`.

## Review notes
- Behavior change worth a careful look: `stop` now reaches the API
instead of being dropped. This changes request payloads for anyone
previously passing `stop`. It is the intended fix, but flagging it
explicitly.
- Coverage: `test_stop_sequence` (integration) exercises the end-to-end
behavior; unit tests cover parameter wiring, per-call-vs-instance
precedence, and the empty-list case.
2026-06-10 20:42:16 -04:00
Mason Daugherty
21eeadf274 test(partners): account for warning behavior in partner tests (#38046)
Partner unit tests now reflect the warning behavior emitted by updated
`langchain-core` serialization and model initialization paths.
Warning-strict runs can stay focused on the behavior under test rather
than expected framework warnings.
2026-06-10 19:50:52 -04:00
Mason Daugherty
007ae66405 test(anthropic): make expected warnings explicit (#38044)
Warning-producing test paths now either exercise the intended Anthropic
model branch or explicitly assert expected warnings. That keeps `make
test` output clean while preserving coverage for backwards-compatible
parameters, deprecated `AnthropicLLM`, and standard structured-output
behavior.
2026-06-10 19:45:37 -04:00
Mason Daugherty
f0a78bf0d7 test(anthropic): make tests robust to gateway base URL (#38043)
Anthropic unit tests now pin the expected API base URL where
serialization and initialization assertions depend on it. That keeps
local gateway settings like `ANTHROPIC_BASE_URL` from changing snapshot
output or default URL assertions during development.
2026-06-10 19:39:50 -04:00
Mason Daugherty
2a11a824ef release(mistralai): 1.1.5 (#38038) 2026-06-10 17:48:09 -04:00
Mason Daugherty
e989c869a4 release(anthropic): 1.4.5 (#38036) 2026-06-10 17:38:01 -04:00
Mason Daugherty
f89f4c5afe fix(core): support content block tokens in callbacks (#34739)
Supersedes #34727
Closes #30703

Related:
* langchain-ai/langchain-google#1460
* langchain-ai/langchain-google#1501

Fixing this at the `langchain-core` callback layer instead of
normalizing inside individual provider integrations, so structured
streaming content is preserved consistently.

---

Models are increasingly streaming structured content blocks instead of
plain text tokens. For example, Gemini 3 can stream text as
content-block lists, and Anthropic/tool-use flows can also produce
non-text message content. Today those values already reach
`on_llm_new_token`, but the callback API still advertises `token: str`,
which makes custom callbacks, tracers, and streaming helpers assume
every streamed value is text.

User story: as a LangChain user building a streaming callback for chat
models with tool calls, reasoning/thinking blocks, or provider-specific
structured content, I need `on_llm_new_token` to accept the same content
shape that chat model chunks can actually emit, so my callback can
observe the stream without providers flattening or dropping non-text
data.

Fixing this in `langchain-core` makes the existing runtime behavior
explicit at the shared callback boundary. Normalizing content blocks
inside each provider would duplicate logic, produce inconsistent
behavior across integrations, and in some cases lose required provider
metadata such as Gemini thought signatures.

## Changes

- Update the callback contract so streamed tokens can be either plain
text or structured content blocks
- Carry structured streamed content through tracing and event/log
streaming paths without forcing provider data into text too early
- Keep built-in text-oriented streaming callbacks working by converting
structured tokens only at the display/queue boundary
- Drop the now-incorrect `cast("str", ...)` on streamed content in
`BaseChatModel` so the producer side matches the widened callback
signature instead of asserting a string it doesn't always have (no
runtime change — `cast` is erased)
- Align Anthropic and Mistral content typing with the structured content
shapes already used by chat model messages
- Update callback tests to reflect that not every streamed value is text

## Compatibility

No runtime behavior change: no producer emits anything it wasn't already
emitting, and widening a parameter type is safe for existing callers and
handlers that pass or receive `str`. The one caveat is downstream code
that subclasses a callback handler or tracer and overrides
`on_llm_new_token` with a `token: str` annotation — under strict type
checking that override is now narrower than the base and will be flagged
as incompatible with the supertype. Such code still runs unchanged; the
fix is to widen the annotation to match.
2026-06-10 16:59:08 -04:00
langchain-model-profile-bot[bot]
2b4735712c chore(model-profiles): refresh model profile data (#38012)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the `refresh_model_profiles` workflow.

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-06-10 10:57:23 -04:00
Mason Daugherty
64ee4d8154 release(groq): 1.1.3 (#38009)
Closes #37996
2026-06-10 04:12:05 +00:00
Mason Daugherty
53f2ad18a0 release(perplexity): 1.4.0 (#37993) 2026-06-09 17:18:28 -04:00
rbuchmayer-pplx
de9502525a feat(perplexity): bind_tools and Responses-API tool round-trip (#37934)
## Summary

Follow-up to #37911 (released in `langchain-perplexity` 1.3.2). That PR
fixed the outbound `ToolMessage` / `AIMessage.tool_calls` serialization;
this one implements **`ChatPerplexity.bind_tools`**, which flips
`has_tool_calling` to `True` and lights up the full `langchain-tests`
standard tool-calling suite — the suite that would have caught #37911 in
the first place.

Verified live against the Perplexity Agent API (`openai/gpt-5.5`,
`use_responses_api=True`): a client-side function-tool round-trip
(invoke + stream) works end-to-end.

## Core change (the `bind_tools` work + the Responses-API follow-up)

- **`bind_tools`** mirrors `langchain-openai`: converts tools via
`convert_to_openai_tool`, normalizes `tool_choice`, and passes
Perplexity built-in tools (`web_search`, etc.) through unchanged.
- **`_to_responses_payload`** now translates tool turns into the
Responses (Agent) API's typed input items: `AIMessage.tool_calls` →
`function_call`, `ToolMessage` → `function_call_output`, and flattens
function tool specs. (The Responses API has no `tool` role, so this
translation is required for round-trips.)

## Changes required to make standard-suite tests pass on the Responses
route

- Streaming: `_convert_responses_stream_event_to_chunk` emits a
`tool_call_chunk` on `response.output_item.done` function calls —
required by `test_tool_calling` (which streams and asserts tool calls).
- `_content_to_text` reduces list-shaped assistant content to text in
the tool-call branch — required by `test_agent_loop` and
`test_tool_message_histories_list_content`.
- `response_metadata["model_name"]` on the Responses route, mirroring
Chat Completions — required by `test_usage_metadata` /
`test_usage_metadata_streaming` (used by `langchain_core` usage
callbacks).

## Tests

- `sonar` standard class marked `has_tool_calling=False` (the family
returns 400 "Tool calling is not supported for this model").
- New `TestPerplexityResponsesStandard` runs the full suite on
`openai/gpt-5.5` + `use_responses_api` with `has_tool_choice=False`:
**35 passed, 13 skipped, 2 xfailed**.
- The 2 xfails (`test_unicode_tool_call_integration`,
`test_structured_few_shot_examples`) hard-code `tool_choice="any"`. The
Responses (Agent) API does not support `tool_choice` (verified: every
form returns HTTP 200 without forcing a call), which `ChatPerplexity`
surfaces as `ValueError` — **existing behavior, unchanged here.**
Softening that to a warning can be a separate change.

`make format lint` clean; unit + standard tests green.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
2026-06-09 17:14:50 -04:00
Mason Daugherty
c0103c3d2c hotfix(openai): min core dep (#37990) 2026-06-09 16:32:08 -04:00
Mason Daugherty
c7d01d5270 release(openai): 1.3.0 (#37989) 2026-06-09 16:15:29 -04:00
Nidhi Rajani
0f45b2c285 feat(openai): support apply_patch built-in tool (#37157)
[Docs](https://github.com/langchain-ai/docs/pull/4370)

Fixes #37031

Adds support for OpenAI Responses API `apply_patch` built-in tool.

This PR:
- Adds `apply_patch` to the OpenAI well-known tools list so
`bind_tools([{"type": "apply_patch"}])` works.
- Preserves `apply_patch_call` and `apply_patch_call_output` items when
converting OpenAI Responses API outputs into LangChain
`AIMessage.content`.
- Preserves the same item types in streaming `AIMessageChunk`
conversion.
- Supports round-trip input conversion for `apply_patch_call` and
`apply_patch_call_output`.
- Adds unit tests for core tool passthrough, non-streaming conversion,
streaming conversion, and round-trip input conversion.

## Testing

- `cd libs/core && uv run --group test pytest
tests/unit_tests/utils/test_function_calling.py -k "apply_patch" -vv`
- `cd libs/partners/openai && uv run --group test pytest
tests/unit_tests/chat_models/test_base.py -k "apply_patch" -vv`
- `cd libs/core && uv run --all-groups ruff check
langchain_core/utils/function_calling.py
tests/unit_tests/utils/test_function_calling.py`
- `cd libs/partners/openai && uv run --all-groups ruff check
langchain_openai/chat_models/base.py
tests/unit_tests/chat_models/test_base.py`

---------

Co-authored-by: Mason Daugherty <github@mdrxy.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
2026-06-09 16:13:37 -04:00
langchain-model-profile-bot[bot]
7e9c916c7e chore(model-profiles): refresh model profile data (#37973)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the `refresh_model_profiles` workflow.

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-06-09 09:59:24 -04:00
langchain-model-profile-bot[bot]
4bd3b6ab64 chore(model-profiles): refresh model profile data (#37958)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the `refresh_model_profiles` workflow.

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-06-08 10:09:26 -04:00
langchain-model-profile-bot[bot]
9fa4d7b6a1 chore(model-profiles): refresh model profile data (#37936)
Automated refresh of model profile data for all in-monorepo partner
integrations via `langchain-profiles refresh`.

🤖 Generated by the `refresh_model_profiles` workflow.

Co-authored-by: mdrxy <61371264+mdrxy@users.noreply.github.com>
2026-06-07 16:16:29 -04:00
dependabot[bot]
ad8c0fc4cc chore: bump pyarrow from 22.0.0 to 23.0.1 in /libs/partners/nomic (#37931)
Bumps [pyarrow](https://github.com/apache/arrow) from 22.0.0 to 23.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/apache/arrow/releases">pyarrow's
releases</a>.</em></p>
<blockquote>
<h2>Apache Arrow 23.0.1</h2>
<p>Release Notes URL: <a
href="https://arrow.apache.org/release/23.0.1.html">https://arrow.apache.org/release/23.0.1.html</a></p>
<h2>Apache Arrow 23.0.1 RC0</h2>
<p>Release Notes: Release Candidate: 23.0.1 RC0</p>
<h2>Apache Arrow 23.0.0</h2>
<p>Release Notes URL: <a
href="https://arrow.apache.org/release/23.0.0.html">https://arrow.apache.org/release/23.0.0.html</a></p>
<h2>Apache Arrow 23.0.0 RC2</h2>
<p>Release Notes: Release Candidate: 23.0.0 RC2</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="82a374e5f3"><code>82a374e</code></a>
MINOR: [Release] Update versions for 23.0.1</li>
<li><a
href="c1ae37c4a5"><code>c1ae37c</code></a>
MINOR: [Release] Update .deb/.rpm changelogs for 23.0.1</li>
<li><a
href="8f6e55736f"><code>8f6e557</code></a>
MINOR: [Release] Update CHANGELOG.md for 23.0.1</li>
<li><a
href="4e16a1aeed"><code>4e16a1a</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/49159">GH-49159</a>:
[C++][Gandiva] Detect overflow in repeat() (<a
href="https://redirect.github.com/apache/arrow/issues/49160">#49160</a>)</li>
<li><a
href="985621dbfc"><code>985621d</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/48817">GH-48817</a>
[R][C++] Bump C++20 in R build infrastructure (<a
href="https://redirect.github.com/apache/arrow/issues/48819">#48819</a>)</li>
<li><a
href="1bea06ad4e"><code>1bea06a</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/49024">GH-49024</a>:
[CI] Update Debian version in <code>.env</code> (<a
href="https://redirect.github.com/apache/arrow/issues/49032">#49032</a>)</li>
<li><a
href="147bcd6d8f"><code>147bcd6</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/49156">GH-49156</a>:
[Python] Require GIL for string comparison (<a
href="https://redirect.github.com/apache/arrow/issues/49161">#49161</a>)</li>
<li><a
href="e4f922b162"><code>e4f922b</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/49138">GH-49138</a>:
[Packaging][Python] Remove nightly cython install from manylinux
wh...</li>
<li><a
href="f9376e4721"><code>f9376e4</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/49003">GH-49003</a>:
[C++] Don't consider <code>out_of_range</code> an error in float parsing
(<a
href="https://redirect.github.com/apache/arrow/issues/49095">#49095</a>)</li>
<li><a
href="ab2c0ad6b2"><code>ab2c0ad</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/49044">GH-49044</a>:
[CI][Python] Fix test_download_tzdata_on_windows by adding
required...</li>
<li>Additional commits viewable in <a
href="https://github.com/apache/arrow/compare/apache-arrow-22.0.0...apache-arrow-23.0.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyarrow&package-manager=uv&previous-version=22.0.0&new-version=23.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langchain/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-07 13:15:04 -07:00
Mason Daugherty
cdafe607af release(perplexity): 1.3.2 (#37925) 2026-06-05 15:18:01 -04:00
rbuchmayer-pplx
1be54cc0e1 fix(perplexity): serialize ToolMessage and AIMessage.tool_calls (#37911)
Fixes #37912

`ChatPerplexity._convert_message_to_dict` raises `TypeError` on
`ToolMessage` and drops `AIMessage.tool_calls`, which breaks
tool-message round-trips through `ChatPerplexity` — a client-side
tool-calling loop, or a shared message history across providers via
`RunnableWithFallbacks`.

Repro:

```python
from langchain_perplexity import ChatPerplexity
from langchain_core.messages import ToolMessage

ChatPerplexity(model="sonar")._convert_message_to_dict(
    ToolMessage(content="result", tool_call_id="call_1")
)
# TypeError: Got unknown type content='result' tool_call_id='call_1'
```

An `AIMessage` carrying `tool_calls` also serializes to `{"role":
"assistant", "content": ...}` with the `tool_calls` silently dropped.

This brings the converter to parity with `langchain-openai`: serialize
`tool_calls` / `invalid_tool_calls`, send `content` as `null` when
tool_calls are present, and add a `tool`-role branch for `ToolMessage`.

How I verified: added unit tests for the `ToolMessage` and
`AIMessage.tool_calls` / `invalid_tool_calls` cases; the perplexity
package unit tests, lint, and format all pass.

Scope: translating these to the Responses (Agent) API's `function_call`
/ `function_call_output` input items is a separate follow-up; this PR is
the Chat Completions serialization parity fix.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
2026-06-05 15:14:42 -04:00