langchain-openai breaking changes
Updated December 4, 2026
On this page
Latest version 1.8.7, released December 4, 2026. Source repository
Packages on PyPI run on Python. Python end of life dates.
- From 0.3.35 to 1.8.3: 12 breaking changes in 7 versions.
- From 0.1.24 to 1.8.3: 40 breaking changes in 17 versions.
langchain-openai 1.8.3 breaking changes
- Removed
langchain_openai.chat_models.codex.logger
langchain_openai.chat_models.codex.logger was removed in langchain-openai 1.8.3 pypi.org
langchain-openai 1.7.4 breaking changes
- Signature changed
langchain_openai.chat_models.base.OpenAIRefusalError
Was class OpenAIRefusalError(Exception); now class OpenAIRefusalError(ModelRefusalError). pypi.org
langchain-openai 1.1.9 breaking changes
- Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.get_num_tokens_from_messages
Was def get_num_tokens_from_messages(self, messages: Sequence[BaseMessage], tools: Sequence[dict[str, Any] | type | Callable | BaseTool] | None = None) -> int; now def get_num_tokens_from_messages(self, messages: Sequence[BaseMessage]... pypi.org
langchain-openai 1.1.2 breaking changes
- Signature changed
langchain_openai.ChatOpenAI.with_structured_output
Was def with_structured_output(self, schema: _DictOrPydanticClass | None = None, *, method: Literal['function_calling', 'json_mode', 'json_schema'] = 'json_schema', include_raw: bool = False, strict: bool | None = None, **kwargs: Any) ->... pypi.org
langchain-openai 1.0.3 breaking changes
- Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.bind_tools
Was def bind_tools(self, tools: Sequence[dict[str, Any] | type | Callable | BaseTool], *, tool_choice: dict | str | bool | None = None, strict: bool | None = None, parallel_tool_calls: bool | None = None, **kwargs: Any) ->... pypi.org
langchain-openai 1.0.1 breaking changes
- Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.openai_api_key
Was openai_api_key: SecretStr | None; now openai_api_key: SecretStr | None | Callable[[], str] | Callable[[], Awaitable[str]]. pypi.org - Signature changed
langchain_openai.llms.azure.BaseOpenAI.openai_api_key
Was openai_api_key: SecretStr | None; now openai_api_key: SecretStr | None | Callable[[], str]. pypi.org - Signature changed
langchain_openai.OpenAIEmbeddings.openai_api_key
Was openai_api_key: SecretStr | None; now openai_api_key: SecretStr | None | Callable[[], str] | Callable[[], Awaitable[str]]. pypi.org
Older versions
12 older versions, each with its first changes. Sign up to see every change
Show 12 older versions
langchain-openai 1.0.0 breaking changes
- Removed
langchain_openai.chat_models.azure.BaseChatOpenAI.bind_functions
BaseChatOpenAI.bind_functions was removed in langchain-openai 1.0.0 pypi.org - Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.bind_tools
Was def bind_tools(self, tools: Sequence[Union[dict[str, Any], type, Callable, BaseTool]], *, tool_choice: Optional[Union[dict, str, Literal['auto', 'none', 'required', 'any'], bool]] = None, strict: Optional[bool] = None... pypi.org
And 2 more in this version.
langchain-openai 0.3.35 breaking changes
- Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.stream_usage
Was stream_usage: bool; now stream_usage: Optional[bool]. pypi.org
langchain-openai 0.3.17 breaking changes
- Signature changed
langchain_openai.OpenAIEmbeddings.aembed_documents
Was async def aembed_documents(self, texts: list[str], chunk_size: int | None = None) -> list[list[float]]; now async def aembed_documents(self, texts: list[str], chunk_size: Optional[int] = None, **kwargs: Any) -> list[list[float]]. pypi.org - Signature changed
langchain_openai.OpenAIEmbeddings.aembed_query
Was async def aembed_query(self, text: str) -> list[float]; now async def aembed_query(self, text: str, **kwargs: Any) -> list[float]. pypi.org
And 2 more in this version.
langchain-openai 0.3.13 breaking changes
- Signature changed
langchain_openai.llms.azure.BaseOpenAI.allowed_special
Was allowed_special: Union[Literal['all'], AbstractSet[str]]; now allowed_special: Union[Literal['all'], set[str]]. pypi.org
langchain-openai 0.3.12 breaking changes
- Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.with_structured_output
Was def with_structured_output(self, schema: Optional[_DictOrPydanticClass] = None, *, method: Literal['function_calling', 'json_mode', 'json_schema'] = 'function_calling', include_raw: bool = False, strict: Optional[bool] = None... pypi.org
langchain-openai 0.3.6 breaking changes
- Removed
langchain_openai.chat_models.azure.BaseChatOpenAI.validate_disable_streaming
BaseChatOpenAI.validate_disable_streaming was removed in langchain-openai 0.3.6 pypi.org
langchain-openai 0.3.5 breaking changes
- Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.bind_tools
Was def bind_tools(self, tools: Sequence[Union[Dict[str, Any], Type, Callable, BaseTool]], *, tool_choice: Optional[Union[dict, str, Literal['auto', 'none', 'required', 'any'], bool]] = None, strict: Optional[bool] = None, **kwargs: Any)... pypi.org
langchain-openai 0.3.0 breaking changes
- Signature changed
langchain_openai.AzureChatOpenAI.with_structured_output
Was def with_structured_output(self, schema: Optional[_DictOrPydanticClass] = None, *, method: Literal['function_calling', 'json_mode', 'json_schema'] = 'function_calling', include_raw: bool = False, strict: Optional[bool] = None... pypi.org - Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.max_retries
Was max_retries: int; now max_retries: Optional[int]. pypi.org
And 3 more in this version.
langchain-openai 0.2.8 breaking changes
- Signature changed
langchain_openai.chat_models.azure.BaseChatOpenAI.get_num_tokens_from_messages
Was def get_num_tokens_from_messages(self, messages: List[BaseMessage]) -> int; now def get_num_tokens_from_messages(self, messages: List[BaseMessage], tools: Optional[Sequence[Union[Dict[str, Any], Type, Callable, BaseTool]]] = None) ->... pypi.org
langchain-openai 0.2.1 breaking changes
- Signature changed
langchain_openai.AzureChatOpenAI.bind_tools
Was def bind_tools(self, tools: Sequence[Union[Dict[str, Any], Type, Callable, BaseTool]], *, tool_choice: Optional[Union[dict, str, Literal['auto', 'none', 'required', 'any'], bool]] = None, **kwargs: Any) -> Runnable[LanguageModelInput... pypi.org - Signature changed
langchain_openai.AzureChatOpenAI.with_structured_output
Was def with_structured_output(self, schema: Optional[_DictOrPydanticClass] = None, *, method: Literal['function_calling', 'json_mode'] = 'function_calling', include_raw: bool = False, **kwargs: Any) -> Runnable[LanguageModelInput... pypi.org
And 2 more in this version.
langchain-openai 0.2.0 breaking changes
- Removed
langchain_openai.chat_models.azure.BaseChatOpenAI.Config
langchain_openai.chat_models.azure.BaseChatOpenAI.Config was removed in langchain-openai 0.2.0 pypi.org - Removed
langchain_openai.llms.azure.BaseOpenAI.Config
langchain_openai.llms.azure.BaseOpenAI.Config was removed in langchain-openai 0.2.0 pypi.org
And 7 more in this version.
langchain-openai 0.1.24 breaking changes
- Signature changed
langchain_openai.AzureChatOpenAI.openai_api_type
Was openai_api_type: str; now openai_api_type: Optional[str]. pypi.org - Signature changed
langchain_openai.AzureChatOpenAI.openai_api_version
Was openai_api_version: str; now openai_api_version: Optional[str]. pypi.org
And 2 more in this version.
Read the guide
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.