autogen_ext.models.openai.config#

class JSONSchema[source]#

Bases: TypedDict

name: Required[str]#

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

description: str#

A description of what the response format is for, used by the model to determine how to respond in the format.

schema: Dict[str, object]#

The schema for the response format, described as a JSON Schema object.

strict: bool | None#

Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

class ResponseFormat[source]#

Bases: TypedDict

type: Literal['text', 'json_object', 'json_schema']#

text, json_object, or json_schema

Type:

The type of response format being defined

json_schema: JSONSchema | None#

json_schema

Type:

The type of response format being defined

class StreamOptions[source]#

Bases: TypedDict

include_usage: bool#
class CreateArguments[source]#

Bases: TypedDict

frequency_penalty: float | None#
logit_bias: Dict[str, int] | None#
max_tokens: int | None#
n: int | None#
presence_penalty: float | None#
response_format: ResponseFormat#
seed: int | None#
stop: str | None | List[str]#
temperature: float | None#
top_p: float | None#
user: str#
stream_options: StreamOptions | None#
parallel_tool_calls: bool | None#
class BaseOpenAIClientConfiguration[source]#

Bases: CreateArguments

model: str#
api_key: str#
timeout: float | None#
max_retries: int#
model_capabilities: ModelCapabilities#
model_info: ModelInfo#
add_name_prefixes: bool#

What functionality the model supports, determined by default from model name but is overriden if value passed.

include_name_in_message: bool#

Whether to include the ‘name’ field in user message parameters. Defaults to True. Set to False for providers that don’t support the ‘name’ field.

default_headers: Dict[str, str] | None#
frequency_penalty: float | None#
logit_bias: Dict[str, int] | None#
max_tokens: int | None#
n: int | None#
presence_penalty: float | None#
response_format: ResponseFormat#
seed: int | None#
stop: str | None | List[str]#
temperature: float | None#
top_p: float | None#
user: str#
stream_options: StreamOptions | None#
parallel_tool_calls: bool | None#
class OpenAIClientConfiguration[source]#

Bases: BaseOpenAIClientConfiguration

organization: str#
base_url: str#
frequency_penalty: float | None#
logit_bias: Dict[str, int] | None#
max_tokens: int | None#
n: int | None#
presence_penalty: float | None#
response_format: ResponseFormat#
seed: int | None#
stop: str | None | List[str]#
temperature: float | None#
top_p: float | None#
user: str#
stream_options: StreamOptions | None#
parallel_tool_calls: bool | None#
model: str#
api_key: str#
timeout: float | None#
max_retries: int#
model_capabilities: ModelCapabilities#
model_info: ModelInfo#
add_name_prefixes: bool#
include_name_in_message: bool#
default_headers: Dict[str, str] | None#
class AzureOpenAIClientConfiguration[source]#

Bases: BaseOpenAIClientConfiguration

azure_endpoint: Required[str]#
azure_deployment: str#
api_version: Required[str]#
azure_ad_token: str#
azure_ad_token_provider: Callable[[], str | Awaitable[str]]#
frequency_penalty: float | None#
logit_bias: Dict[str, int] | None#
max_tokens: int | None#
n: int | None#
presence_penalty: float | None#
response_format: ResponseFormat#
seed: int | None#
stop: str | None | List[str]#
temperature: float | None#
top_p: float | None#
user: str#
stream_options: StreamOptions | None#
parallel_tool_calls: bool | None#
model: str#
api_key: str#
timeout: float | None#
max_retries: int#
model_capabilities: ModelCapabilities#
model_info: ModelInfo#
add_name_prefixes: bool#
include_name_in_message: bool#
default_headers: Dict[str, str] | None#
pydantic model CreateArgumentsConfigModel[source]#

Bases: BaseModel

Show JSON schema
{
   "title": "CreateArgumentsConfigModel",
   "type": "object",
   "properties": {
      "frequency_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Frequency Penalty"
      },
      "logit_bias": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "integer"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Logit Bias"
      },
      "max_tokens": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Tokens"
      },
      "n": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "N"
      },
      "presence_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Presence Penalty"
      },
      "response_format": {
         "anyOf": [
            {
               "$ref": "#/$defs/ResponseFormat"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "seed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Seed"
      },
      "stop": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop"
      },
      "temperature": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Temperature"
      },
      "top_p": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Top P"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User"
      },
      "stream_options": {
         "anyOf": [
            {
               "$ref": "#/$defs/StreamOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "parallel_tool_calls": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Parallel Tool Calls"
      }
   },
   "$defs": {
      "JSONSchema": {
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "schema": {
               "title": "Schema",
               "type": "object"
            },
            "strict": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Strict"
            }
         },
         "required": [
            "name"
         ],
         "title": "JSONSchema",
         "type": "object"
      },
      "ResponseFormat": {
         "properties": {
            "type": {
               "enum": [
                  "text",
                  "json_object",
                  "json_schema"
               ],
               "title": "Type",
               "type": "string"
            },
            "json_schema": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JSONSchema"
                  },
                  {
                     "type": "null"
                  }
               ]
            }
         },
         "required": [
            "type",
            "json_schema"
         ],
         "title": "ResponseFormat",
         "type": "object"
      },
      "StreamOptions": {
         "properties": {
            "include_usage": {
               "title": "Include Usage",
               "type": "boolean"
            }
         },
         "required": [
            "include_usage"
         ],
         "title": "StreamOptions",
         "type": "object"
      }
   }
}

Fields:
field frequency_penalty: float | None = None#
field logit_bias: Dict[str, int] | None = None#
field max_tokens: int | None = None#
field n: int | None = None#
field presence_penalty: float | None = None#
field response_format: ResponseFormat | None = None#
field seed: int | None = None#
field stop: str | List[str] | None = None#
field temperature: float | None = None#
field top_p: float | None = None#
field user: str | None = None#
field stream_options: StreamOptions | None = None#
field parallel_tool_calls: bool | None = None#
pydantic model BaseOpenAIClientConfigurationConfigModel[source]#

Bases: CreateArgumentsConfigModel

Show JSON schema
{
   "title": "BaseOpenAIClientConfigurationConfigModel",
   "type": "object",
   "properties": {
      "frequency_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Frequency Penalty"
      },
      "logit_bias": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "integer"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Logit Bias"
      },
      "max_tokens": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Tokens"
      },
      "n": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "N"
      },
      "presence_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Presence Penalty"
      },
      "response_format": {
         "anyOf": [
            {
               "$ref": "#/$defs/ResponseFormat"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "seed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Seed"
      },
      "stop": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop"
      },
      "temperature": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Temperature"
      },
      "top_p": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Top P"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User"
      },
      "stream_options": {
         "anyOf": [
            {
               "$ref": "#/$defs/StreamOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "parallel_tool_calls": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Parallel Tool Calls"
      },
      "model": {
         "title": "Model",
         "type": "string"
      },
      "api_key": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Api Key"
      },
      "timeout": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Timeout"
      },
      "max_retries": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Retries"
      },
      "model_capabilities": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelCapabilities"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "model_info": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelInfo"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "add_name_prefixes": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Add Name Prefixes"
      },
      "include_name_in_message": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Include Name In Message"
      },
      "default_headers": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Default Headers"
      }
   },
   "$defs": {
      "JSONSchema": {
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "schema": {
               "title": "Schema",
               "type": "object"
            },
            "strict": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Strict"
            }
         },
         "required": [
            "name"
         ],
         "title": "JSONSchema",
         "type": "object"
      },
      "ModelCapabilities": {
         "deprecated": true,
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output"
         ],
         "title": "ModelCapabilities",
         "type": "object"
      },
      "ModelInfo": {
         "description": "ModelInfo is a dictionary that contains information about a model's properties.\nIt is expected to be used in the model_info property of a model client.\n\nWe are expecting this to grow over time as we add more features.",
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            },
            "family": {
               "anyOf": [
                  {
                     "enum": [
                        "gpt-5",
                        "gpt-41",
                        "gpt-45",
                        "gpt-4o",
                        "o1",
                        "o3",
                        "o4",
                        "gpt-4",
                        "gpt-35",
                        "r1",
                        "gemini-1.5-flash",
                        "gemini-1.5-pro",
                        "gemini-2.0-flash",
                        "gemini-2.5-pro",
                        "gemini-2.5-flash",
                        "claude-3-haiku",
                        "claude-3-sonnet",
                        "claude-3-opus",
                        "claude-3-5-haiku",
                        "claude-3-5-sonnet",
                        "claude-3-7-sonnet",
                        "claude-4-opus",
                        "claude-4-sonnet",
                        "llama-3.3-8b",
                        "llama-3.3-70b",
                        "llama-4-scout",
                        "llama-4-maverick",
                        "codestral",
                        "open-codestral-mamba",
                        "mistral",
                        "ministral",
                        "pixtral",
                        "unknown"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "string"
                  }
               ],
               "title": "Family"
            },
            "structured_output": {
               "title": "Structured Output",
               "type": "boolean"
            },
            "multiple_system_messages": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Multiple System Messages"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output",
            "family",
            "structured_output"
         ],
         "title": "ModelInfo",
         "type": "object"
      },
      "ResponseFormat": {
         "properties": {
            "type": {
               "enum": [
                  "text",
                  "json_object",
                  "json_schema"
               ],
               "title": "Type",
               "type": "string"
            },
            "json_schema": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JSONSchema"
                  },
                  {
                     "type": "null"
                  }
               ]
            }
         },
         "required": [
            "type",
            "json_schema"
         ],
         "title": "ResponseFormat",
         "type": "object"
      },
      "StreamOptions": {
         "properties": {
            "include_usage": {
               "title": "Include Usage",
               "type": "boolean"
            }
         },
         "required": [
            "include_usage"
         ],
         "title": "StreamOptions",
         "type": "object"
      }
   },
   "required": [
      "model"
   ]
}

Fields:
field model: str [Required]#
field api_key: SecretStr | None = None#
field timeout: float | None = None#
field max_retries: int | None = None#
field model_capabilities: ModelCapabilities | None = None#
field model_info: ModelInfo | None = None#
field add_name_prefixes: bool | None = None#
field include_name_in_message: bool | None = None#
field default_headers: Dict[str, str] | None = None#
field frequency_penalty: float | None = None#
field logit_bias: Dict[str, int] | None = None#
field max_tokens: int | None = None#
field n: int | None = None#
field presence_penalty: float | None = None#
field response_format: ResponseFormat | None = None#
field seed: int | None = None#
field stop: str | List[str] | None = None#
field temperature: float | None = None#
field top_p: float | None = None#
field user: str | None = None#
field stream_options: StreamOptions | None = None#
field parallel_tool_calls: bool | None = None#
pydantic model OpenAIClientConfigurationConfigModel[source]#

Bases: BaseOpenAIClientConfigurationConfigModel

Show JSON schema
{
   "title": "OpenAIClientConfigurationConfigModel",
   "type": "object",
   "properties": {
      "frequency_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Frequency Penalty"
      },
      "logit_bias": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "integer"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Logit Bias"
      },
      "max_tokens": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Tokens"
      },
      "n": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "N"
      },
      "presence_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Presence Penalty"
      },
      "response_format": {
         "anyOf": [
            {
               "$ref": "#/$defs/ResponseFormat"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "seed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Seed"
      },
      "stop": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop"
      },
      "temperature": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Temperature"
      },
      "top_p": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Top P"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User"
      },
      "stream_options": {
         "anyOf": [
            {
               "$ref": "#/$defs/StreamOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "parallel_tool_calls": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Parallel Tool Calls"
      },
      "model": {
         "title": "Model",
         "type": "string"
      },
      "api_key": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Api Key"
      },
      "timeout": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Timeout"
      },
      "max_retries": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Retries"
      },
      "model_capabilities": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelCapabilities"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "model_info": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelInfo"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "add_name_prefixes": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Add Name Prefixes"
      },
      "include_name_in_message": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Include Name In Message"
      },
      "default_headers": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Default Headers"
      },
      "organization": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Organization"
      },
      "base_url": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Base Url"
      }
   },
   "$defs": {
      "JSONSchema": {
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "schema": {
               "title": "Schema",
               "type": "object"
            },
            "strict": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Strict"
            }
         },
         "required": [
            "name"
         ],
         "title": "JSONSchema",
         "type": "object"
      },
      "ModelCapabilities": {
         "deprecated": true,
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output"
         ],
         "title": "ModelCapabilities",
         "type": "object"
      },
      "ModelInfo": {
         "description": "ModelInfo is a dictionary that contains information about a model's properties.\nIt is expected to be used in the model_info property of a model client.\n\nWe are expecting this to grow over time as we add more features.",
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            },
            "family": {
               "anyOf": [
                  {
                     "enum": [
                        "gpt-5",
                        "gpt-41",
                        "gpt-45",
                        "gpt-4o",
                        "o1",
                        "o3",
                        "o4",
                        "gpt-4",
                        "gpt-35",
                        "r1",
                        "gemini-1.5-flash",
                        "gemini-1.5-pro",
                        "gemini-2.0-flash",
                        "gemini-2.5-pro",
                        "gemini-2.5-flash",
                        "claude-3-haiku",
                        "claude-3-sonnet",
                        "claude-3-opus",
                        "claude-3-5-haiku",
                        "claude-3-5-sonnet",
                        "claude-3-7-sonnet",
                        "claude-4-opus",
                        "claude-4-sonnet",
                        "llama-3.3-8b",
                        "llama-3.3-70b",
                        "llama-4-scout",
                        "llama-4-maverick",
                        "codestral",
                        "open-codestral-mamba",
                        "mistral",
                        "ministral",
                        "pixtral",
                        "unknown"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "string"
                  }
               ],
               "title": "Family"
            },
            "structured_output": {
               "title": "Structured Output",
               "type": "boolean"
            },
            "multiple_system_messages": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Multiple System Messages"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output",
            "family",
            "structured_output"
         ],
         "title": "ModelInfo",
         "type": "object"
      },
      "ResponseFormat": {
         "properties": {
            "type": {
               "enum": [
                  "text",
                  "json_object",
                  "json_schema"
               ],
               "title": "Type",
               "type": "string"
            },
            "json_schema": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JSONSchema"
                  },
                  {
                     "type": "null"
                  }
               ]
            }
         },
         "required": [
            "type",
            "json_schema"
         ],
         "title": "ResponseFormat",
         "type": "object"
      },
      "StreamOptions": {
         "properties": {
            "include_usage": {
               "title": "Include Usage",
               "type": "boolean"
            }
         },
         "required": [
            "include_usage"
         ],
         "title": "StreamOptions",
         "type": "object"
      }
   },
   "required": [
      "model"
   ]
}

Fields:
field organization: str | None = None#
field model: str [Required]#
field api_key: SecretStr | None = None#
field timeout: float | None = None#
field max_retries: int | None = None#
field model_capabilities: ModelCapabilities | None = None#
field model_info: ModelInfo | None = None#
field add_name_prefixes: bool | None = None#
field include_name_in_message: bool | None = None#
field default_headers: Dict[str, str] | None = None#
field frequency_penalty: float | None = None#
field logit_bias: Dict[str, int] | None = None#
field max_tokens: int | None = None#
field n: int | None = None#
field presence_penalty: float | None = None#
field response_format: ResponseFormat | None = None#
field seed: int | None = None#
field stop: str | List[str] | None = None#
field temperature: float | None = None#
field top_p: float | None = None#
field user: str | None = None#
field stream_options: StreamOptions | None = None#
field parallel_tool_calls: bool | None = None#
field base_url: str | None = None#
pydantic model AzureOpenAIClientConfigurationConfigModel[source]#

Bases: BaseOpenAIClientConfigurationConfigModel

Show JSON schema
{
   "title": "AzureOpenAIClientConfigurationConfigModel",
   "type": "object",
   "properties": {
      "frequency_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Frequency Penalty"
      },
      "logit_bias": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "integer"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Logit Bias"
      },
      "max_tokens": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Tokens"
      },
      "n": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "N"
      },
      "presence_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Presence Penalty"
      },
      "response_format": {
         "anyOf": [
            {
               "$ref": "#/$defs/ResponseFormat"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "seed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Seed"
      },
      "stop": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop"
      },
      "temperature": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Temperature"
      },
      "top_p": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Top P"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User"
      },
      "stream_options": {
         "anyOf": [
            {
               "$ref": "#/$defs/StreamOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "parallel_tool_calls": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Parallel Tool Calls"
      },
      "model": {
         "title": "Model",
         "type": "string"
      },
      "api_key": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Api Key"
      },
      "timeout": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Timeout"
      },
      "max_retries": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Retries"
      },
      "model_capabilities": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelCapabilities"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "model_info": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelInfo"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "add_name_prefixes": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Add Name Prefixes"
      },
      "include_name_in_message": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Include Name In Message"
      },
      "default_headers": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Default Headers"
      },
      "azure_endpoint": {
         "title": "Azure Endpoint",
         "type": "string"
      },
      "azure_deployment": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Azure Deployment"
      },
      "api_version": {
         "title": "Api Version",
         "type": "string"
      },
      "azure_ad_token": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Azure Ad Token"
      },
      "azure_ad_token_provider": {
         "anyOf": [
            {
               "$ref": "#/$defs/ComponentModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "ComponentModel": {
         "description": "Model class for a component. Contains all information required to instantiate a component.",
         "properties": {
            "provider": {
               "title": "Provider",
               "type": "string"
            },
            "component_type": {
               "anyOf": [
                  {
                     "enum": [
                        "model",
                        "agent",
                        "tool",
                        "termination",
                        "token_provider",
                        "workbench"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Component Type"
            },
            "version": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            },
            "component_version": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Component Version"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "label": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Label"
            },
            "config": {
               "title": "Config",
               "type": "object"
            }
         },
         "required": [
            "provider",
            "config"
         ],
         "title": "ComponentModel",
         "type": "object"
      },
      "JSONSchema": {
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "schema": {
               "title": "Schema",
               "type": "object"
            },
            "strict": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Strict"
            }
         },
         "required": [
            "name"
         ],
         "title": "JSONSchema",
         "type": "object"
      },
      "ModelCapabilities": {
         "deprecated": true,
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output"
         ],
         "title": "ModelCapabilities",
         "type": "object"
      },
      "ModelInfo": {
         "description": "ModelInfo is a dictionary that contains information about a model's properties.\nIt is expected to be used in the model_info property of a model client.\n\nWe are expecting this to grow over time as we add more features.",
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            },
            "family": {
               "anyOf": [
                  {
                     "enum": [
                        "gpt-5",
                        "gpt-41",
                        "gpt-45",
                        "gpt-4o",
                        "o1",
                        "o3",
                        "o4",
                        "gpt-4",
                        "gpt-35",
                        "r1",
                        "gemini-1.5-flash",
                        "gemini-1.5-pro",
                        "gemini-2.0-flash",
                        "gemini-2.5-pro",
                        "gemini-2.5-flash",
                        "claude-3-haiku",
                        "claude-3-sonnet",
                        "claude-3-opus",
                        "claude-3-5-haiku",
                        "claude-3-5-sonnet",
                        "claude-3-7-sonnet",
                        "claude-4-opus",
                        "claude-4-sonnet",
                        "llama-3.3-8b",
                        "llama-3.3-70b",
                        "llama-4-scout",
                        "llama-4-maverick",
                        "codestral",
                        "open-codestral-mamba",
                        "mistral",
                        "ministral",
                        "pixtral",
                        "unknown"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "string"
                  }
               ],
               "title": "Family"
            },
            "structured_output": {
               "title": "Structured Output",
               "type": "boolean"
            },
            "multiple_system_messages": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Multiple System Messages"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output",
            "family",
            "structured_output"
         ],
         "title": "ModelInfo",
         "type": "object"
      },
      "ResponseFormat": {
         "properties": {
            "type": {
               "enum": [
                  "text",
                  "json_object",
                  "json_schema"
               ],
               "title": "Type",
               "type": "string"
            },
            "json_schema": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JSONSchema"
                  },
                  {
                     "type": "null"
                  }
               ]
            }
         },
         "required": [
            "type",
            "json_schema"
         ],
         "title": "ResponseFormat",
         "type": "object"
      },
      "StreamOptions": {
         "properties": {
            "include_usage": {
               "title": "Include Usage",
               "type": "boolean"
            }
         },
         "required": [
            "include_usage"
         ],
         "title": "StreamOptions",
         "type": "object"
      }
   },
   "required": [
      "model",
      "azure_endpoint",
      "api_version"
   ]
}

Fields:
field model: str [Required]#
field api_key: SecretStr | None = None#
field timeout: float | None = None#
field max_retries: int | None = None#
field model_capabilities: ModelCapabilities | None = None#
field model_info: ModelInfo | None = None#
field add_name_prefixes: bool | None = None#
field include_name_in_message: bool | None = None#
field default_headers: Dict[str, str] | None = None#
field frequency_penalty: float | None = None#
field logit_bias: Dict[str, int] | None = None#
field max_tokens: int | None = None#
field n: int | None = None#
field presence_penalty: float | None = None#
field response_format: ResponseFormat | None = None#
field seed: int | None = None#
field stop: str | List[str] | None = None#
field temperature: float | None = None#
field top_p: float | None = None#
field user: str | None = None#
field stream_options: StreamOptions | None = None#
field parallel_tool_calls: bool | None = None#
field azure_endpoint: str [Required]#
field azure_deployment: str | None = None#
field api_version: str [Required]#
field azure_ad_token: str | None = None#
field azure_ad_token_provider: ComponentModel | None = None#