Skip to content

Deprecation Notice: LangSmith Tracing Changes #34689

@mdrxy

Description

@mdrxy

Summary

Starting with langchain-core 1.2.4, we've made important changes to how runs are traced to LangSmith. If you're using an older version of LangChain, you may experience missing token counts, cost information, or input data in your LangSmith traces.

What's Changing

1. Token Counts and Cost Metrics

Issue: Token counts and cost information may not appear in LangSmith traces when using older LangChain versions.

What happened: We've updated where token usage metadata is stored in traces. The LangSmith platform now expects this information in a specific location that older LangChain versions don't populate.

Action Required: Upgrade to langchain-core 1.2.4 or later to ensure token counts and cost metrics continue to appear in your traces. Information on backports below.

2. Streaming Runnable Inputs

Issue: When using the .transform() or .atransform() methods on any runnable, input data may not appear in LangSmith traces on older LangChain versions.

What happened: Previously, these methods would create a trace before inputs were fully materialized, then attempt to update the inputs later. LangSmith now requires all inputs to be provided when the trace is initially created, not as a later update.

Action Required: Upgrade to langchain-core 1.2.4 or later to ensure inputs from .transform() and .atransform() are properly captured in traces. Information on backports below.

Recommended Action

Upgrade to the latest version of LangChain:

uv pip install --upgrade langchain-core

Affected Versions

  • langchain-core 1.2.4: Versions prior to 1.2.4
  • Backport Support: We've backported these fixes langchain-core 0.3.82

Timeline

  • Now: Deprecation warnings will begin appearing in affected versions
  • Soon: LangSmith will fully enforce these requirements - older versions will experience missing data in traces

Questions?

If you have questions or need assistance upgrading, please:


Note: This change only affects tracing to LangSmith. Core LangChain functionality is not impacted. However, upgrading ensures you maintain full observability of your LLM applications.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-cli
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-perplexity
  • langchain-prompty
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingBreaking changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions