Agent Frameworks

LangChain Core 1.5.1 adds LangSmith gateway support for Anthropic, Fireworks, OpenAI

New release fixes tool token counting and adds env var gateway.

Deep Dive

LangChain has released langchain-core version 1.5.1, a patch update that brings two notable improvements for developers building with LLM tools. The headline feature is support for the LangSmith gateway through environment variables, now available for Anthropic, Fireworks, and OpenAI integrations. This allows teams to easily route API calls through LangSmith's observability and tracing infrastructure without modifying their existing code—just set the relevant env vars.

The second fix addresses token counting in base tools. Previously, the count_tokens_approximately method did not use the cached tool_call_schema, potentially leading to inaccurate token estimates when calling tools. By leveraging the schema cache, the release ensures more reliable token accounting, which is critical for cost management and context window planning. This is a minor but stable release for the core library, and all users are encouraged to upgrade.

Key Points
  • LangSmith gateway integration via environment variables for Anthropic, Fireworks, and OpenAI providers
  • Fixed token counting in BaseTool by utilizing the tool_call_schema cache for more accurate estimates
  • Released as patch version 1.5.1 on July 23, 2024

Why It Matters

Enables seamless tracing and monitoring of LLM tool calls across major providers.

📬 Get the top 10 AI stories daily