BaseChatOpenAI()Optional additional JSON properties to include in the request parameters when making requests to OpenAI compatible APIs, such as vLLM, LM Studio, or other providers.
This is the recommended way to pass custom parameters that are specific to your OpenAI-compatible API provider but not part of the standard OpenAI API.
Examples:
extra_body={"ttl": 300}extra_body={"use_beam_search": True}Do not use model_kwargs for custom parameters that are not part of the
standard OpenAI API, as this will cause errors when making API calls. Use
extra_body instead.
Base wrapper around OpenAI large language models for chat.
This base class targets
official OpenAI API specifications
only. Non-standard response fields added by third-party providers (e.g.,
reasoning_content) are not extracted. Use a provider-specific subclass for
full provider support.