Industry story
langchain-openai 1.5.2a1 released with gateway metadata and o-series token fixes
mcp orchestration reliability tool-use
The o-series token counting bug was quietly breaking a lot of production pipelines, and the 1.5.2a1 alpha finally fixes it. Beyond that patch, the 1.x series has been steadily building out OpenAI's newer surface area: the Responses API with structured output and streaming, explicit prompt caching, server-side conversation compaction, and gateway metadata extraction from response headers. The addition of langchain-openrouter as a standalone provider package is worth noting for anyone running multi-model routing. If you're on o-series models and hitting token errors, this is the upgrade to pull.
Full analysis
LangChain released langchain-openai version 1.5.2a1, an alpha pre-release that accumulates several meaningful changes across the 1.3–1.5 version series. Key additions include extracting gateway metadata from response headers, fixing token counting for OpenAI's o-series reasoning models (which previously failed in get_num_tokens_from_messages), preserving streamed encrypted reasoning content, and full support for the OpenAI Python SDK 3.0.
Earlier in the 1.x series, notable features landed: support for OpenAI's Responses API (including structured output, streaming, image generation, and built-in tools like code interpreter and remote MCP tool calls), explicit prompt caching, automatic server-side conversation compaction, a new ChatOpenAICodex model backed by ChatGPT OAuth, reasoning_effort as a standard chat model parameter, and a new langchain-openrouter provider package. An MCP authorization header redaction fix was also included, relevant to agent builders routing tool calls through MCP servers.
Comments