Products
LangChain LangSmith LangGraph
Methods
Retrieval Agents Evaluation
Resources
Blog Case Studies LangChain Academy Community Experts Changelog
Docs
Python
LangChain LangSmith LangGraph
JavaScript
LangChain LangSmith LangGraph
Company
About Careers
Pricing
Get a demo
Sign up

LangChain Changelog



Sign up for our newsletter to stay up to date
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
arrow-left Back to Announcements
DATE:
March 27, 2025
AUTHOR:
The LangChain Team
LangChain

Universal token counting callback for LangChain Python

DATE: March 27, 2025
AUTHOR: The LangChain Team

We've added a new callback/context manager that tracks token usage across all major LangChain chat models, including support for:

  • Cached tokens

  • Multi-modal token counting

  • Works with all major LangChain chat models

Docs: https://python.langchain.com/docs/how_to/chat_token_usage_tracking/#using-callbacks

Powered by LaunchNotes
Subscribe to updates
By clicking subscribe, you accept our privacy policy and terms and conditions. reCAPTCHA privacy and terms apply