LangChain: Token Counting Fix for Plain Functions

A single focused fix aligns the approximate token counter with its documented behavior so plain functions no longer crash. No broader pattern emerged across activity today.

Duration: PT2M3S

Episode overview

This episode is a short developer briefing from LangChain.

It explains recent repository work in plain language.

  • Show: LangChain
  • Published: 2026-10-19T13:02:30Z
  • Audio duration: PT2M3S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

Good morning, it's Monday, October nineteenth, twenty twenty-six, and this is your LangChain developer briefing.

There is no broad pattern today, just a single high impact reliability fix that aligns documented behavior with actual behavior in token estimation.

The focus is the approximate token counting utility and its tools parameter. The documentation states it accepts a base tool instance, a dictionary, or a plain callable, with callables converted to Open AI tool format before counting. In practice, passing a bare function failed with an attribute error about a…

For developers, the impact is on API predictability and day to day reliability. If you prototype with simple Python functions and use approximate counts to budget context window space, trim prompts, or estimate cost, you previously hit a crash that contradicted the docs. You no longer need to manually wrap those…

It is also worth noting the scope is deliberately narrow, centered on utilities and test related support rather than model integrations or prompting pipelines. That keeps release risk low, with no change in counting logic itself, only in how input types are accepted and normalized.

What is next to watch is…

Nearby episodes from LangChain

  1. State Leak Fixes and Python 3.10 Removal
  2. Weekly Recap - Streaming Efficiency and Agent Control
  3. Tool Call Reliability Fixes
  4. Streaming Fixes, Retry Misalignment, and Python 3.10 Removal
  5. Cheaper Streaming and Safer Agent Recovery
  6. Per-Call Approvals and Leaner Streaming
  7. Agent Steering, Shell Reliability, and Content Fixes
  8. Mid-Conversation Releases and Flexible Summarization