-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Description
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-coreAffected Versions
langchain-core 1.2.4: Versions prior to1.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:
- Check our LangChain v1 migration guide or versioning documentation
- Open an issue on GitHub
- Contact us at [email protected]
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