Skip to content

Conversation

@angus-langchain
Copy link

@angus-langchain angus-langchain commented Dec 30, 2025

Description

In LangSmith 0.6.0, we update the Run and RunTree object to use pydantic v2. This PR adds support for this change by using the correct method for langsmith >= 0.6.0 pydantic >= v2. It has backwards compatibility for older sdk versions as well with deprecated methods

@github-actions github-actions bot added core `langchain-core` package issues & PRs dependencies Pull requests that update a dependency file (e.g. `pyproject.toml` or `uv.lock`) labels Dec 30, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 30, 2025

CodSpeed Performance Report

Merging #34541 will not alter performance

Comparing angus/langsmith-pydantic-v2 (312655f) with master (2bbe421)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched
⏩ 21 skipped1

Footnotes

  1. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@angus-langchain angus-langchain changed the title update langsmith version chore(core): Update LangChainTracer to use Pydantic v2 methods Dec 30, 2025
@github-actions github-actions bot added the infra PRs made that include chores, devops, repo meta changes label Dec 30, 2025
@angus-langchain angus-langchain marked this pull request as ready for review December 30, 2025 14:08
@github-actions github-actions bot added infra PRs made that include chores, devops, repo meta changes and removed infra PRs made that include chores, devops, repo meta changes labels Dec 30, 2025
res.key,
score=res.score,
value=res.value,
value=res.value, # type: ignore[arg-type]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this related to pydantic migration or masking a separate issue?

Comment on lines +79 to +80
if hasattr(get_env_var, "cache_clear"):
get_env_var.cache_clear() # type: ignore[attr-defined]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a separate langsmith API change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core `langchain-core` package issues & PRs dependencies Pull requests that update a dependency file (e.g. `pyproject.toml` or `uv.lock`) infra PRs made that include chores, devops, repo meta changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants