Agent DailyAgent Daily
releaseintermediate

[Release] langchain-ai/langchain langchain-openai==1.5.2a1: langchain-openai==1.5.2a1

By github-actions[bot]github
View original on github

langchain-openai version 1.5.2a1 is released with support for extracting gateway metadata from response headers and improved handling of o-series models in token counting. The release includes fixes for streamed encrypted reasoning, invalid tool calls, and context window errors, along with support for the OpenAI 3.0 SDK. Recent versions have added features like explicit prompt caching, ChatGPT OAuth-backed models, and content-block-centric streaming improvements.

Key Points

  • Extract gateway metadata from OpenAI response headers when available for better observability and tracing
  • Support o-series models in `get_num_tokens_from_messages` function for accurate token counting
  • Preserve streamed encrypted reasoning in responses to maintain data integrity during streaming
  • Filter invalid tool calls from content to prevent malformed tool execution
  • Support OpenAI 3.0 SDK with updated integration and compatibility
  • Handle `ContextWindowExceededError` gracefully with proper error management
  • Implement explicit prompt caching for improved performance and cost efficiency
  • Add `reasoning_effort` as a standard chat model parameter for fine-grained control
  • Support LangSmith gateway through environment variables for seamless integration
  • Prevent silent streaming hangs in ChatOpenAI with improved async handling

Found this useful? Add it to a playbook for a step-by-step implementation guide.

Workflow Diagram

Start Process
Step A
Step B
Step C
Complete
Quality

Concepts