langchain-openai==1.5.2a1
📦 langchainView on GitHub →
✨ 10 features🐛 34 fixes🔧 5 symbols
Summary
This release introduces several new features including gateway metadata extraction, OpenAI 3.0 SDK support, and explicit prompt caching. It also includes numerous bug fixes for streaming, tool calls, and error handling.
Migration Steps
- Bump langgraph floor in openai and huggingface lockfiles.
- Bump min core dep.
- Bump min core versions.
- Bump core dep.
✨ New Features
- Extract gateway metadata from response headers when available.
- Support OpenAI 3.0 SDK.
- Support LangSmith gateway through environment variable for Anthropic, Fireworks, and OpenAI.
- Add `reasoning_effort` as a standard chat model parameter.
- Support explicit prompt caching.
- Add ChatGPT OAuth-backed `ChatOpenAICodex` chat model.
- Add package version tracking to tracing metadata.
- Add content-block-centric streaming (v2).
- Prevent silent streaming hangs in `ChatOpenAI`.
- Impute placeholder filenames for OpenAI file inputs.
🐛 Bug Fixes
- Support o-series models in `get_num_tokens_from_messages`.
- Preserve streamed encrypted reasoning.
- Filter invalid tool calls from content.
- Handle `ContextWindowExceededError`.
- Filter langchain-generated content block IDs.
- Preserve Responses `text` options.
- Redact MCP `authorization`.
- Correct `gpt-5.3-chat-latest` profile.
- Suppress Pydantic serializer warning on structured output parsed field.
- Use `asyncio.get_running_loop()` in async contexts.
- Clarify async API key sync failure trace.
- Drop response item ids when `store` is false.
- Only set `strict=True` on tools for OpenAI-compatible models in `ProviderStrategy`.
- Clarify expected strict schema error.
- Drop `stop` from Responses API payload.
- Build Codex async headers off the event loop in `_agenerate`.
- Avoid sync token reads in Codex streaming.
- Normalize v1 streamed tool calls.
- Tighten structured output model fallbacks.
- Unbreak audio chat and Azure embedding integration tests.
- Guard httpx finalizers.
- Source LLM context size from model profiles.
- Broaden condition for ContextOverflowError to accommodate other providers.
- Add gpt-5.5 pro to Responses API check.
- Tolerate `prompt_cache_retention` drift in streaming.
- Accommodate dict `response` items in streaming.
- Infer azure chat profiles from model name.
- Use SSRF-safe transport for image token counting.
- Handle content blocks without type key in responses api conversion.
- Fix broken vcr cassette playback and add ci guard.
- Use is-not-None checks in usage metadata token extraction.
- Fixed typos in the documentation.
- Update computer call test.
- Let user-provided User-Agent override the Azure default.