# What changed in langchain-openai

> 102 changes in langchain-openai 1 from its official release notes, upgrade guides and advisories: 4 breaking, 5 security, 25 new APIs and options. Each one cited. Sources checked 2026-10-20. HTML: https://unstale.sh/pypi/langchain-openai/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## langchain-openai 1

### Breaking changes

- The stream path now raises on error events. (1.6.6) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.6)
- The stop field is dropped from Responses API payloads. (1.3.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.3.3)
- The minimum required langchain-core version was bumped. (1.1.12) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.12)
- Updates the file index key name, affecting code that reads or writes this key. (1.0.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.0)

### Security

- Preserves encrypted reasoning in streamed responses. (1.5.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.5.1)
- Redacts MCP authorization. (1.4.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.4.2)
- Image token counting now uses an SSRF-safe transport. (1.1.14) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.14), [security advisory](https://github.com/advisories/GHSA-R7W7-9XR2-QQ2R)
- Text content blocks in chat completions are now sanitized. (1.1.10) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.10)
- URLs are sanitized when counting tokens in images. (1.1.9) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.9)

### New APIs and options

- Model profiles now declare mid-conversation support, allowing developers to identify models with this capability. (1.7.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.7.1)
- Adds support for the decisions API. (1.7.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.7.0)
- Azure workload identity is now discovered. (1.6.7) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.7)
- Added profile augmentations for Opus 5.5 and GPT-6. (1.6.5) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.5)
- Added support for async tools. (1.6.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.1)
- Added support for configuration_update. (1.6.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.1)
- Adds standard model exception types for handling model errors. (1.6.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.0)
- langchain-openai supports the OpenAI 3.0 SDK, allowing developers to use that SDK with the integration. (1.5.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.5.0)
- LangSmith gateway support is available through an environment variable. (1.4.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.4.1)
- Adds reasoning_effort as a standard chat model parameter. (1.4.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.4.0)
- Adds support for explicit prompt caching. (1.3.5) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.3.5)
- Adds package version tracking to tracing metadata and renames the package version trace metadata. (1.3.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.3.1)
- Support the apply_patch built-in tool. (1.3.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.3.0)
- Content-block-centric streaming (v2) was added. (1.2.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.2.1)
- The OpenAI integration now supports the phase parameter. (1.1.12) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.12)
- OpenRouter adds support for streaming token usage. (1.1.11) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.11)
- Tool search is now supported. (1.1.11) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.11)
- Support was added for automatic server-side compaction. (1.1.10) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.10)
- Adds ContextOverflowError, which is raised in OpenAI when context overflows. (1.1.9) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.9)
- Adds text_inputs to model profiles. (1.1.9) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.9)
- Adds text_outputs to model profiles. (1.1.9) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.9)
- Adds a strict flag to structured output. (1.1.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.2)
- Adds the missing tools parameter to ChatOpenAI.with_structured_output. (1.1.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.2)
- Adds OpenAI moderation middleware. (1.0.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.0)
- OpenAI service tier token details are now populated. (1.0.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.0)

### Behavior and default changes

- Tool changes can now be made on SystemMessage instances mid-conversation. (1.6.5) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.5)
- Gateway metadata is extracted from response headers when available. (1.5.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.5.2)
- The model token mapping was extended through gpt-5.2 for modelname_to_contextsize. (1.1.10) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.10)
- Model profiles were updated, which may affect model capability information used by the package. (1.1.8) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.8)
- Maximum input token limits were updated for the gpt-5 series. (1.1.6) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.6)
- Uses the responses API when the model is gpt-5.2-pro. (1.1.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.3)
- The openai_api_key parameter now supports callable values. (1.0.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.1)
- Enables stream_usage when using the default base URL and client. (1.0.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.0)

### Fixes and other changes

- Responses stream items stay on one block when output_index drifts. (1.7.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.7.2)
- Request constraints are supported for GPT-6. (1.6.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.3)
- Inferred Responses API routing is exposed at initialization. (1.6.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.3)
- Adds GPT-6 Astra reasoning effort support. (1.6.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.2)
- Fixed support for Azure AD authentication with OpenAI 3.8. (1.6.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.1)
- Corrected the reasoning_effort_levels for gpt-5 and gpt-5.1 profiles. (1.6.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.1)
- Corrected routing for gpt-5.6-sol to use the Responses API. (1.6.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.1)
- Raises a clear error when `_create_chat_result` receives an unexpected response type. (1.6.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.6.0)
- Supports o-series models when counting tokens from messages. (1.5.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.5.2)
- Reasoning item boundaries are preserved. (1.5.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.5.2)
- Invalid tool calls are filtered from content. (1.4.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.4.3)
- Filters LangChain-generated content block IDs. (1.4.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.4.2)
- Handles ContextWindowExceededError. (1.4.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.4.2)
- Preserves Responses text options. (1.4.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.4.2)
- Corrected the profile for this model. (1.4.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.4.1)
- Suppresses a Pydantic serializer warning on the structured output parsed field. (1.3.4) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.3.4)
- Tools are only set to strict=True for OpenAI-compatible models. (1.3.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.3.3)
- Response item IDs are dropped when store is false. (1.3.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.3.3)
- Normalizes v1 streamed tool calls. (1.3.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.3.1)
- Broadens the condition for ContextOverflowError to accommodate other providers. (1.2.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.2.2)
- Guards httpx finalizers to prevent errors during finalization. (1.2.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.2.2)
- The Responses API check now includes gpt-5.5 pro. (1.2.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.2.1)
- Prevents silent streaming hangs in ChatOpenAI. (1.2.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.2.0)
- Streaming now tolerates prompt_cache_retention drift. (1.1.16) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.16)
- Azure chat profiles are now inferred from the model name. (1.1.15) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.15)
- Model profile data was refreshed. (1.1.15) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.15)
- Streaming now accommodates dict response items. (1.1.15) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.15)
- Placeholder filenames are imputed for OpenAI file inputs. (1.1.13) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.13)
- Responses API conversion now handles content blocks that lack a type key. (1.1.13) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.13)
- Usage metadata token extraction now uses is-not-None checks. (1.1.13) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.13)
- A user-provided User-Agent can override the Azure default. (1.1.13) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.13)
- Missing ModelProfile fields were added, and schema drift now produces a warning. (1.1.12) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.12)
- Streaming function_call chunks now preserve the namespace field. (1.1.12) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.12)
- Responses API input items now include type: message. (1.1.12) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.12)
- PIL Image handles are closed during token counting to prevent a file descriptor leak. (1.1.12) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.12)
- Valid responses that are falsy at runtime are now accepted. (1.1.11) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.11)
- File URL inputs accommodate breaking changes, with CSV called out in the change. (1.1.11) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.11)
- Model detection for the Responses API is updated to handle pro and codex models. (1.1.11) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.11)
- Structured output avoids PydanticSerializationUnexpectedValue. (1.1.11) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.11)
- The error message for non-OpenAI embedding providers was enhanced. (1.1.10) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.10)
- A model property was added. (1.1.10) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.10)
- The error message for null choices in OpenAI-compatible APIs was improved. (1.1.10) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.10)
- The gpt-5.2-pro Model Profile structured_output key was fixed. (1.1.10) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.10)
- Codex models are now detected for Responses API preference. (1.1.8) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.8)
- Structured output refusals now raise the proper OpenAIRefusalError. (1.1.7) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.7)
- The Responses API now handles empty assistant content. (1.1.7) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.7)
- Token counting now handles function_call content. (1.1.7) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.7)
- Token counting now filters function_call blocks. (1.1.7) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.7)
- Relies on langchain-core for setting chunk_position. (1.1.5) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.5)
- Reverts the switch from nano to mini when using flex. (1.1.4) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.4)
- Corrects the aspect ratio caps used when resizing images. (1.1.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.3)
- Handles responses API content blocks that lack a text key. (1.1.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.3)
- Allows temperature when reasoning is set to the string 'none'. (1.1.2) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.2)
- Fixes an error when using the Responses API with built-in tools and custom tools. (1.1.1) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.1)
- GPT-5 temperature validation is now case-insensitive. (1.1.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.1.0)
- create_agent and response_format are fixed for the Responses API. (1.0.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.3)
- Embedding requests respect the API's 300k token limit. (1.0.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.3)
- Backward compatibility for response_format is fixed. (1.0.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.3)
- The response.incomplete event is handled when using stream_mode=['messages']. (1.0.3) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.3)
- Conditionally skips stream_usage in chat completions when OPENAI_BASE_URL is set. (1.0.0) — [release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-openai%3D%3D1.0.0)
