models Package

Canonical non-generated model types for the response server.

Modules

errors

Error model types for request validation failures.

runtime

Runtime domain models for response sessions and stream events.

Classes

A2APreviewTool

An agent implementing the A2A protocol.

A2AToolCall

An A2A (Agent-to-Agent) tool call.

A2AToolCallOutput

The output of an A2A (Agent-to-Agent) tool call.

AISearchIndexResource

A AI Search Index resource.

AgentReference

AgentReference.

Annotation

An annotation that applies to a span of output text.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ContainerFileCitationBody, FileCitationBody, FilePath, UrlCitationBody

ApiErrorResponse

Error response for API failures.

ApplyPatchCreateFileOperation

Apply patch create file operation.

ApplyPatchCreateFileOperationParam

Apply patch create file operation.

ApplyPatchDeleteFileOperation

Apply patch delete file operation.

ApplyPatchDeleteFileOperationParam

Apply patch delete file operation.

ApplyPatchFileOperation

Apply patch operation.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ApplyPatchCreateFileOperation, ApplyPatchDeleteFileOperation, ApplyPatchUpdateFileOperation

ApplyPatchOperationParam

Apply patch operation.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ApplyPatchCreateFileOperationParam, ApplyPatchDeleteFileOperationParam, ApplyPatchUpdateFileOperationParam

ApplyPatchToolCallItemParam

Apply patch tool call.

ApplyPatchToolCallOutputItemParam

Apply patch tool call output.

ApplyPatchToolParam

Apply patch tool.

ApplyPatchUpdateFileOperation

Apply patch update file operation.

ApplyPatchUpdateFileOperationParam

Apply patch update file operation.

ApproximateLocation

ApproximateLocation.

AutoCodeInterpreterToolParam

Automatic Code Interpreter Tool Parameters.

AzureAISearchTool

The input definition information for an Azure AI search tool as used to configure an agent.

AzureAISearchToolCall

An Azure AI Search tool call.

AzureAISearchToolCallOutput

The output of an Azure AI Search tool call.

AzureAISearchToolResource

A set of index resources used by the azure_ai_search tool.

AzureFunctionBinding

The structure for keeping storage queue name and URI.

AzureFunctionDefinition

The definition of Azure function.

AzureFunctionDefinitionFunction

AzureFunctionDefinitionFunction.

AzureFunctionStorageQueue

The structure for keeping storage queue name and URI.

AzureFunctionTool

The input definition information for an Azure Function Tool, as used to configure an Agent.

AzureFunctionToolCall

An Azure Function tool call.

AzureFunctionToolCallOutput

The output of an Azure Function tool call.

BingCustomSearchConfiguration

A bing custom search configuration.

BingCustomSearchPreviewTool

The input definition information for a Bing custom search tool as used to configure an agent.

BingCustomSearchToolCall

A Bing custom search tool call.

BingCustomSearchToolCallOutput

The output of a Bing custom search tool call.

BingCustomSearchToolParameters

The bing custom search tool parameters.

BingGroundingSearchConfiguration

Search configuration for Bing Grounding.

BingGroundingSearchToolParameters

The bing grounding search tool parameters.

BingGroundingTool

The input definition information for a bing grounding search tool as used to configure an agent.

BingGroundingToolCall

A Bing grounding tool call.

BingGroundingToolCallOutput

The output of a Bing grounding tool call.

BrowserAutomationPreviewTool

The input definition information for a Browser Automation Tool, as used to configure an Agent.

BrowserAutomationToolCall

A browser automation tool call.

BrowserAutomationToolCallOutput

The output of a browser automation tool call.

BrowserAutomationToolConnectionParameters

Definition of input parameters for the connection used by the Browser Automation Tool.

BrowserAutomationToolParameters

Definition of input parameters for the Browser Automation Tool.

CaptureStructuredOutputsTool

A tool for capturing structured outputs.

ChatSummaryMemoryItem

A memory item containing a summary extracted from conversations.

ClickParam

Click.

CodeInterpreterOutputImage

Code interpreter output image.

CodeInterpreterOutputLogs

Code interpreter output logs.

CodeInterpreterTool

Code interpreter.

CompactResource

The compacted response object.

CompactionSummaryItemParam

Compaction item.

ComparisonFilter

Comparison Filter.

CompoundFilter

Compound Filter.

ComputerAction

ComputerAction.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ClickParam, DoubleClickAction, DragParam, KeyPressAction, MoveParam, ScreenshotParam, ScrollParam, TypeParam, WaitParam

ComputerCallOutputItemParam

Computer tool call output.

ComputerCallSafetyCheckParam

A pending safety check for the computer call.

ComputerScreenshotContent

Computer screenshot.

ComputerScreenshotImage

A computer screenshot image used with the computer use tool.

ComputerUsePreviewTool

Computer use preview.

ContainerAutoParam

ContainerAutoParam.

ContainerFileCitationBody

Container file citation.

ContainerNetworkPolicyAllowlistParam

ContainerNetworkPolicyAllowlistParam.

ContainerNetworkPolicyDisabledParam

ContainerNetworkPolicyDisabledParam.

ContainerNetworkPolicyDomainSecretParam

ContainerNetworkPolicyDomainSecretParam.

ContainerNetworkPolicyParam

Network access policy for the container.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ContainerNetworkPolicyAllowlistParam, ContainerNetworkPolicyDisabledParam

ContainerReferenceResource

Container Reference.

ContainerSkill

ContainerSkill.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: InlineSkillParam, SkillReferenceParam

ContextManagementParam

ContextManagementParam.

ConversationParam_2

Conversation object.

ConversationReference

Conversation.

CoordParam

Coordinate.

CreateResponse

Override generated CreateResponse to correct temperature/top_p types.

CustomGrammarFormatParam

Grammar format.

CustomTextFormatParam

Text format.

CustomToolParam

Custom tool.

CustomToolParamFormat

The input format for the custom tool. Default is unconstrained text.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: CustomGrammarFormatParam, CustomTextFormatParam

DeleteResponseResult

The result of a delete response operation.

DoubleClickAction

DoubleClick.

DragParam

Drag.

Error

Error.

FabricDataAgentToolCall

A Fabric data agent tool call.

FabricDataAgentToolCallOutput

The output of a Fabric data agent tool call.

FabricDataAgentToolParameters

The fabric data agent tool parameters.

FileCitationBody

File citation.

FilePath

File path.

FileSearchTool

File search.

FileSearchToolCallResults

FileSearchToolCallResults.

FunctionAndCustomToolCallOutput

FunctionAndCustomToolCallOutput.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: FunctionAndCustomToolCallOutputInputFileContent, FunctionAndCustomToolCallOutputInputImageContent, FunctionAndCustomToolCallOutputInputTextContent

FunctionAndCustomToolCallOutputInputFileContent

Input file.

FunctionAndCustomToolCallOutputInputImageContent

Input image.

FunctionAndCustomToolCallOutputInputTextContent

Input text.

FunctionCallOutputItemParam

Function tool call output.

FunctionShellAction

Shell exec action.

FunctionShellActionParam

Shell action.

FunctionShellCallEnvironment

FunctionShellCallEnvironment.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ContainerReferenceResource, LocalEnvironmentResource

FunctionShellCallItemParam

Shell tool call.

FunctionShellCallItemParamEnvironment

The environment to execute the shell commands in.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: FunctionShellCallItemParamEnvironmentContainerReferenceParam, FunctionShellCallItemParamEnvironmentLocalEnvironmentParam

FunctionShellCallItemParamEnvironmentContainerReferenceParam

FunctionShellCallItemParamEnvironmentContainerReferenceParam.

FunctionShellCallItemParamEnvironmentLocalEnvironmentParam

FunctionShellCallItemParamEnvironmentLocalEnvironmentParam.

FunctionShellCallOutputContent

Shell call output content.

FunctionShellCallOutputContentParam

Shell output content.

FunctionShellCallOutputExitOutcome

Shell call exit outcome.

FunctionShellCallOutputExitOutcomeParam

Shell call exit outcome.

FunctionShellCallOutputItemParam

Shell tool call output.

FunctionShellCallOutputOutcome

Shell call outcome.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: FunctionShellCallOutputExitOutcome, FunctionShellCallOutputTimeoutOutcome

FunctionShellCallOutputOutcomeParam

Shell call outcome.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: FunctionShellCallOutputExitOutcomeParam, FunctionShellCallOutputTimeoutOutcomeParam

FunctionShellCallOutputTimeoutOutcome

Shell call timeout outcome.

FunctionShellCallOutputTimeoutOutcomeParam

Shell call timeout outcome.

FunctionShellToolParam

Shell tool.

FunctionShellToolParamEnvironment

FunctionShellToolParamEnvironment.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ContainerAutoParam, FunctionShellToolParamEnvironmentContainerReferenceParam, FunctionShellToolParamEnvironmentLocalEnvironmentParam

FunctionShellToolParamEnvironmentContainerReferenceParam

FunctionShellToolParamEnvironmentContainerReferenceParam.

FunctionShellToolParamEnvironmentLocalEnvironmentParam

FunctionShellToolParamEnvironmentLocalEnvironmentParam.

FunctionTool

Function.

FunctionToolCallOutput

Function tool call output.

FunctionToolCallOutputResource

FunctionToolCallOutputResource.

HybridSearchOptions

HybridSearchOptions.

ImageGenTool

Image generation tool.

ImageGenToolInputImageMask

ImageGenToolInputImageMask.

InlineSkillParam

InlineSkillParam.

InlineSkillSourceParam

Inline skill payload.

InputFileContent

Input file.

InputFileContentParam

Input file.

InputImageContent

Input image.

InputImageContentParamAutoParam

Input image.

InputTextContent

Input text.

InputTextContentParam

Input text.

Item

Content item used to generate a response.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ApplyPatchToolCallItemParam, ApplyPatchToolCallOutputItemParam, ItemCodeInterpreterToolCall, CompactionSummaryItemParam, ItemComputerToolCall, ComputerCallOutputItemParam, ItemCustomToolCall, ItemCustomToolCallOutput, ItemFileSearchToolCall, ItemFunctionToolCall, FunctionCallOutputItemParam, ItemImageGenToolCall, ItemReferenceParam, ItemLocalShellToolCall, ItemLocalShellToolCallOutput, ItemMcpApprovalRequest, MCPApprovalResponse, ItemMcpToolCall, ItemMcpListTools, MemorySearchToolCallItemParam, ItemMessage, ItemOutputMessage, ItemReasoningItem, FunctionShellCallItemParam, FunctionShellCallOutputItemParam, ItemWebSearchToolCall

ItemCodeInterpreterToolCall

Code interpreter tool call.

ItemComputerToolCall

Computer tool call.

ItemCustomToolCall

Custom tool call.

ItemCustomToolCallOutput

Custom tool call output.

ItemField

An item representing a message, tool call, tool output, reasoning, or other response element.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ItemFieldApplyPatchToolCall, ItemFieldApplyPatchToolCallOutput, ItemFieldCodeInterpreterToolCall, ItemFieldCompactionBody, ItemFieldComputerToolCall, ItemFieldComputerToolCallOutputResource, ItemFieldCustomToolCall, ItemFieldCustomToolCallOutput, ItemFieldFileSearchToolCall, ItemFieldFunctionToolCall, FunctionToolCallOutput, ItemFieldImageGenToolCall, ItemFieldLocalShellToolCall, ItemFieldLocalShellToolCallOutput, ItemFieldMcpApprovalRequest, ItemFieldMcpApprovalResponseResource, ItemFieldMcpToolCall, ItemFieldMcpListTools, ItemFieldMessage, ItemFieldReasoningItem, ItemFieldFunctionShellCall, ItemFieldFunctionShellCallOutput, ItemFieldWebSearchToolCall

ItemFieldApplyPatchToolCall

Apply patch tool call.

ItemFieldApplyPatchToolCallOutput

Apply patch tool call output.

ItemFieldCodeInterpreterToolCall

Code interpreter tool call.

ItemFieldCompactionBody

Compaction item.

ItemFieldComputerToolCall

Computer tool call.

ItemFieldComputerToolCallOutputResource

ItemFieldComputerToolCallOutputResource.

ItemFieldCustomToolCall

Custom tool call.

ItemFieldCustomToolCallOutput

Custom tool call output.

ItemFieldFileSearchToolCall

File search tool call.

ItemFieldFunctionShellCall

Shell tool call.

ItemFieldFunctionShellCallOutput

Shell call output.

ItemFieldFunctionToolCall

Function tool call.

ItemFieldImageGenToolCall

Image generation call.

ItemFieldLocalShellToolCall

Local shell call.

ItemFieldLocalShellToolCallOutput

Local shell call output.

ItemFieldMcpApprovalRequest

MCP approval request.

ItemFieldMcpApprovalResponseResource

MCP approval response.

ItemFieldMcpListTools

MCP list tools.

ItemFieldMcpToolCall

MCP tool call.

ItemFieldMessage

Message.

ItemFieldReasoningItem

Reasoning.

ItemFieldWebSearchToolCall

Web search tool call.

ItemFileSearchToolCall

File search tool call.

ItemFunctionToolCall

Function tool call.

ItemImageGenToolCall

Image generation call.

ItemLocalShellToolCall

Local shell call.

ItemLocalShellToolCallOutput

Local shell call output.

ItemMcpApprovalRequest

MCP approval request.

ItemMcpListTools

MCP list tools.

ItemMcpToolCall

MCP tool call.

ItemMessage

Message.

ItemOutputMessage

Output message.

ItemReasoningItem

Reasoning.

ItemReferenceParam

Item reference.

ItemWebSearchToolCall

Web search tool call.

KeyPressAction

KeyPress.

LocalEnvironmentResource

Local Environment.

LocalShellExecAction

Local shell exec action.

LocalShellToolParam

Local shell tool.

LocalSkillParam

LocalSkillParam.

LogProb

Log probability.

MCPApprovalResponse

MCP approval response.

MCPListToolsTool

MCP list tools tool.

MCPListToolsToolAnnotations

MCPListToolsToolAnnotations.

MCPListToolsToolInputSchema

MCPListToolsToolInputSchema.

MCPTool

MCP tool.

MCPToolFilter

MCP tool filter.

MCPToolRequireApproval

MCPToolRequireApproval.

MemoryItem

A single memory item stored in the memory store, containing content and metadata.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ChatSummaryMemoryItem, UserProfileMemoryItem

MemorySearchItem

A retrieved memory item from memory search.

MemorySearchOptions

Memory search options.

MemorySearchPreviewTool

A tool for integrating memories into the agent.

MemorySearchToolCallItemParam

MemorySearchToolCallItemParam.

MemorySearchToolCallItemResource

MemorySearchToolCallItemResource.

MessageContent

A content part that makes up an input or output item.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ComputerScreenshotContent, MessageContentInputFileContent, MessageContentInputImageContent, MessageContentInputTextContent, MessageContentOutputTextContent, MessageContentReasoningTextContent, MessageContentRefusalContent, SummaryTextContent, TextContent

MessageContentInputFileContent

Input file.

MessageContentInputImageContent

Input image.

MessageContentInputTextContent

Input text.

MessageContentOutputTextContent

Output text.

MessageContentReasoningTextContent

Reasoning text.

MessageContentRefusalContent

Refusal.

Metadata

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

MicrosoftFabricPreviewTool

The input definition information for a Microsoft Fabric tool as used to configure an agent.

MoveParam

Move.

OAuthConsentRequestOutputItem

Request from the service for the user to perform OAuth consent.

OpenApiAnonymousAuthDetails

Security details for OpenApi anonymous authentication.

OpenApiAuthDetails

authentication details for OpenApiFunctionDefinition.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: OpenApiAnonymousAuthDetails, OpenApiManagedAuthDetails, OpenApiProjectConnectionAuthDetails

OpenApiFunctionDefinition

The input definition information for an openapi function.

OpenApiFunctionDefinitionFunction

OpenApiFunctionDefinitionFunction.

OpenApiManagedAuthDetails

Security details for OpenApi managed_identity authentication.

OpenApiManagedSecurityScheme

Security scheme for OpenApi managed_identity authentication.

OpenApiProjectConnectionAuthDetails

Security details for OpenApi project connection authentication.

OpenApiProjectConnectionSecurityScheme

Security scheme for OpenApi managed_identity authentication.

OpenApiTool

The input definition information for an OpenAPI tool as used to configure an agent.

OpenApiToolCall

An OpenAPI tool call.

OpenApiToolCallOutput

The output of an OpenAPI tool call.

OutputContent

OutputContent.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: OutputContentOutputTextContent, OutputContentReasoningTextContent, OutputContentRefusalContent

OutputContentOutputTextContent

Output text.

OutputContentReasoningTextContent

Reasoning text.

OutputContentRefusalContent

Refusal.

OutputItem

OutputItem.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: A2AToolCall, A2AToolCallOutput, OutputItemApplyPatchToolCall, OutputItemApplyPatchToolCallOutput, AzureAISearchToolCall, AzureAISearchToolCallOutput, AzureFunctionToolCall, AzureFunctionToolCallOutput, BingCustomSearchToolCall, BingCustomSearchToolCallOutput, BingGroundingToolCall, BingGroundingToolCallOutput, BrowserAutomationToolCall, BrowserAutomationToolCallOutput, OutputItemCodeInterpreterToolCall, OutputItemCompactionBody, OutputItemComputerToolCall, OutputItemComputerToolCallOutputResource, OutputItemCustomToolCall, OutputItemCustomToolCallOutput, FabricDataAgentToolCall, FabricDataAgentToolCallOutput, OutputItemFileSearchToolCall, OutputItemFunctionToolCall, FunctionToolCallOutputResource, OutputItemImageGenToolCall, OutputItemLocalShellToolCall, OutputItemLocalShellToolCallOutput, OutputItemMcpApprovalRequest, OutputItemMcpApprovalResponseResource, OutputItemMcpToolCall, OutputItemMcpListTools, MemorySearchToolCallItemResource, OutputItemMessage, OAuthConsentRequestOutputItem, OpenApiToolCall, OpenApiToolCallOutput, OutputItemOutputMessage, OutputItemReasoningItem, SharepointGroundingToolCall, SharepointGroundingToolCallOutput, OutputItemFunctionShellCall, OutputItemFunctionShellCallOutput, StructuredOutputsOutputItem, OutputItemWebSearchToolCall, WorkflowActionOutputItem

OutputItemApplyPatchToolCall

Apply patch tool call.

OutputItemApplyPatchToolCallOutput

Apply patch tool call output.

OutputItemCodeInterpreterToolCall

Code interpreter tool call.

OutputItemCompactionBody

Compaction item.

OutputItemComputerToolCall

Computer tool call.

OutputItemComputerToolCallOutputResource

OutputItemComputerToolCallOutputResource.

OutputItemCustomToolCall

Custom tool call.

OutputItemCustomToolCallOutput

Custom tool call output.

OutputItemFileSearchToolCall

File search tool call.

OutputItemFunctionShellCall

Shell tool call.

OutputItemFunctionShellCallOutput

Shell call output.

OutputItemFunctionToolCall

Function tool call.

OutputItemImageGenToolCall

Image generation call.

OutputItemLocalShellToolCall

Local shell call.

OutputItemLocalShellToolCallOutput

Local shell call output.

OutputItemMcpApprovalRequest

MCP approval request.

OutputItemMcpApprovalResponseResource

MCP approval response.

OutputItemMcpListTools

MCP list tools.

OutputItemMcpToolCall

MCP tool call.

OutputItemMessage

Message.

OutputItemOutputMessage

Output message.

OutputItemReasoningItem

Reasoning.

OutputItemWebSearchToolCall

Web search tool call.

OutputMessageContent

OutputMessageContent.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: OutputMessageContentOutputTextContent, OutputMessageContentRefusalContent

OutputMessageContentOutputTextContent

Output text.

OutputMessageContentRefusalContent

Refusal.

Prompt

Reference to a prompt template and its variables. Learn more.

RankingOptions

RankingOptions.

Reasoning

Reasoning.

ReasoningTextContent

Reasoning text.

ResponseAudioDeltaEvent

Emitted when there is a partial audio response.

ResponseAudioDoneEvent

Emitted when the audio response is complete.

ResponseAudioTranscriptDeltaEvent

Emitted when there is a partial transcript of audio.

ResponseAudioTranscriptDoneEvent

Emitted when the full audio transcript is completed.

ResponseCodeInterpreterCallCodeDeltaEvent

Emitted when a partial code snippet is streamed by the code interpreter.

ResponseCodeInterpreterCallCodeDoneEvent

Emitted when the code snippet is finalized by the code interpreter.

ResponseCodeInterpreterCallCompletedEvent

Emitted when the code interpreter call is completed.

ResponseCodeInterpreterCallInProgressEvent

Emitted when a code interpreter call is in progress.

ResponseCodeInterpreterCallInterpretingEvent

Emitted when the code interpreter is actively interpreting the code snippet.

ResponseCompletedEvent

Emitted when the model response is complete.

ResponseContentPartAddedEvent

Emitted when a new content part is added.

ResponseContentPartDoneEvent

Emitted when a content part is done.

ResponseCreatedEvent

An event that is emitted when a response is created.

ResponseCustomToolCallInputDeltaEvent

ResponseCustomToolCallInputDelta.

ResponseCustomToolCallInputDoneEvent

ResponseCustomToolCallInputDone.

ResponseErrorEvent

Emitted when an error occurs.

ResponseErrorInfo

An error object returned when the model fails to generate a Response.

ResponseFailedEvent

An event that is emitted when a response fails.

ResponseFileSearchCallCompletedEvent

Emitted when a file search call is completed (results found).

ResponseFileSearchCallInProgressEvent

Emitted when a file search call is initiated.

ResponseFileSearchCallSearchingEvent

Emitted when a file search is currently searching.

ResponseFormatJsonSchemaSchema

JSON schema.

ResponseFunctionCallArgumentsDeltaEvent

Emitted when there is a partial function-call arguments delta.

ResponseFunctionCallArgumentsDoneEvent

Emitted when function-call arguments are finalized.

ResponseImageGenCallCompletedEvent

ResponseImageGenCallCompletedEvent.

ResponseImageGenCallGeneratingEvent

ResponseImageGenCallGeneratingEvent.

ResponseImageGenCallInProgressEvent

ResponseImageGenCallInProgressEvent.

ResponseImageGenCallPartialImageEvent

ResponseImageGenCallPartialImageEvent.

ResponseInProgressEvent

Emitted when the response is in progress.

ResponseIncompleteDetails

ResponseIncompleteDetails.

ResponseIncompleteEvent

An event that is emitted when a response finishes as incomplete.

ResponseLogProb

A logprob is the logarithmic probability that the model assigns to producing a particular token at a given position in the sequence. Less-negative (higher) logprob values indicate greater model confidence in that token choice.

ResponseLogProbTopLogprobs

ResponseLogProbTopLogprobs.

ResponseMCPCallArgumentsDeltaEvent

ResponseMCPCallArgumentsDeltaEvent.

ResponseMCPCallArgumentsDoneEvent

ResponseMCPCallArgumentsDoneEvent.

ResponseMCPCallCompletedEvent

ResponseMCPCallCompletedEvent.

ResponseMCPCallFailedEvent

ResponseMCPCallFailedEvent.

ResponseMCPCallInProgressEvent

ResponseMCPCallInProgressEvent.

ResponseMCPListToolsCompletedEvent

ResponseMCPListToolsCompletedEvent.

ResponseMCPListToolsFailedEvent

ResponseMCPListToolsFailedEvent.

ResponseMCPListToolsInProgressEvent

ResponseMCPListToolsInProgressEvent.

ResponseObject

Override generated ResponseObject to correct temperature/top_p types and fix Sphinx docstring warnings.

ResponseOutputItemAddedEvent

Emitted when a new output item is added.

ResponseOutputItemDoneEvent

Emitted when an output item is marked done.

ResponseOutputTextAnnotationAddedEvent

ResponseOutputTextAnnotationAddedEvent.

ResponsePromptVariables

Prompt Variables.

ResponseQueuedEvent

ResponseQueuedEvent.

ResponseReasoningSummaryPartAddedEvent

Emitted when a new reasoning summary part is added.

ResponseReasoningSummaryPartAddedEventPart

ResponseReasoningSummaryPartAddedEventPart.

ResponseReasoningSummaryPartDoneEvent

Emitted when a reasoning summary part is completed.

ResponseReasoningSummaryPartDoneEventPart

ResponseReasoningSummaryPartDoneEventPart.

ResponseReasoningSummaryTextDeltaEvent

Emitted when a delta is added to a reasoning summary text.

ResponseReasoningSummaryTextDoneEvent

Emitted when a reasoning summary text is completed.

ResponseReasoningTextDeltaEvent

Emitted when a delta is added to a reasoning text.

ResponseReasoningTextDoneEvent

Emitted when a reasoning text is completed.

ResponseRefusalDeltaEvent

Emitted when there is a partial refusal text.

ResponseRefusalDoneEvent

Emitted when refusal text is finalized.

ResponseStreamEvent

ResponseStreamEvent.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ResponseErrorEvent, ResponseAudioDeltaEvent, ResponseAudioDoneEvent, ResponseAudioTranscriptDeltaEvent, ResponseAudioTranscriptDoneEvent, ResponseCodeInterpreterCallCompletedEvent, ResponseCodeInterpreterCallInProgressEvent, ResponseCodeInterpreterCallInterpretingEvent, ResponseCodeInterpreterCallCodeDeltaEvent, ResponseCodeInterpreterCallCodeDoneEvent, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseContentPartDoneEvent, ResponseCreatedEvent, ResponseCustomToolCallInputDeltaEvent, ResponseCustomToolCallInputDoneEvent, ResponseFailedEvent, ResponseFileSearchCallCompletedEvent, ResponseFileSearchCallInProgressEvent, ResponseFileSearchCallSearchingEvent, ResponseFunctionCallArgumentsDeltaEvent, ResponseFunctionCallArgumentsDoneEvent, ResponseImageGenCallCompletedEvent, ResponseImageGenCallGeneratingEvent, ResponseImageGenCallInProgressEvent, ResponseImageGenCallPartialImageEvent, ResponseInProgressEvent, ResponseIncompleteEvent, ResponseMCPCallCompletedEvent, ResponseMCPCallFailedEvent, ResponseMCPCallInProgressEvent, ResponseMCPCallArgumentsDeltaEvent, ResponseMCPCallArgumentsDoneEvent, ResponseMCPListToolsCompletedEvent, ResponseMCPListToolsFailedEvent, ResponseMCPListToolsInProgressEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextAnnotationAddedEvent, ResponseTextDeltaEvent, ResponseTextDoneEvent, ResponseQueuedEvent, ResponseReasoningSummaryPartAddedEvent, ResponseReasoningSummaryPartDoneEvent, ResponseReasoningSummaryTextDeltaEvent, ResponseReasoningSummaryTextDoneEvent, ResponseReasoningTextDeltaEvent, ResponseReasoningTextDoneEvent, ResponseRefusalDeltaEvent, ResponseRefusalDoneEvent, ResponseWebSearchCallCompletedEvent, ResponseWebSearchCallInProgressEvent, ResponseWebSearchCallSearchingEvent

ResponseStreamOptions

Options for streaming responses. Only set this when you set stream: true.

ResponseTextDeltaEvent

Emitted when there is an additional text delta.

ResponseTextDoneEvent

Emitted when text content is finalized.

ResponseTextParam

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:

ResponseUsage

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

ResponseUsageInputTokensDetails

ResponseUsageInputTokensDetails.

ResponseUsageOutputTokensDetails

ResponseUsageOutputTokensDetails.

ResponseWebSearchCallCompletedEvent

Emitted when a web search call is completed.

ResponseWebSearchCallInProgressEvent

Emitted when a web search call is initiated.

ResponseWebSearchCallSearchingEvent

Emitted when a web search call is executing.

ScreenshotParam

Screenshot.

ScrollParam

Scroll.

SharepointGroundingToolCall

A SharePoint grounding tool call.

SharepointGroundingToolCallOutput

The output of a SharePoint grounding tool call.

SharepointGroundingToolParameters

The sharepoint grounding tool parameters.

SharepointPreviewTool

The input definition information for a sharepoint tool as used to configure an agent.

SkillReferenceParam

SkillReferenceParam.

SpecificApplyPatchParam

Specific apply patch tool choice.

SpecificFunctionShellParam

Specific shell tool choice.

StructuredOutputDefinition

A structured output that can be produced by the agent.

StructuredOutputsOutputItem

StructuredOutputsOutputItem.

SummaryTextContent

Summary text.

TextContent

Text Content.

TextResponseFormatConfiguration

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: TextResponseFormatConfigurationResponseFormatJsonObject, TextResponseFormatJsonSchema, TextResponseFormatConfigurationResponseFormatText

TextResponseFormatConfigurationResponseFormatJsonObject

JSON object.

TextResponseFormatConfigurationResponseFormatText

Text.

TextResponseFormatJsonSchema

JSON schema.

Tool

A tool that can be used to generate a response.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: A2APreviewTool, ApplyPatchToolParam, AzureAISearchTool, AzureFunctionTool, BingCustomSearchPreviewTool, BingGroundingTool, BrowserAutomationPreviewTool, CaptureStructuredOutputsTool, CodeInterpreterTool, ComputerUsePreviewTool, CustomToolParam, MicrosoftFabricPreviewTool, FileSearchTool, FunctionTool, ImageGenTool, LocalShellToolParam, MCPTool, MemorySearchPreviewTool, OpenApiTool, SharepointPreviewTool, FunctionShellToolParam, WebSearchTool, WebSearchPreviewTool, WorkIQPreviewTool

ToolChoiceAllowed

Override generated ToolChoiceAllowed to fix Sphinx code-block warning.

ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

ToolChoiceCustom

Custom tool.

ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

ToolChoiceFunction

Function tool.

ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

ToolChoiceMCP

MCP tool.

ToolChoiceParam

How the model should select which tool (or tools) to use when generating a response. See the tools parameter to see how to specify which tools the model can call.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ToolChoiceAllowed, SpecificApplyPatchParam, ToolChoiceCodeInterpreter, ToolChoiceComputerUsePreview, ToolChoiceCustom, ToolChoiceFileSearch, ToolChoiceFunction, ToolChoiceImageGeneration, ToolChoiceMCP, SpecificFunctionShellParam, ToolChoiceWebSearchPreview, ToolChoiceWebSearchPreview20250311

ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

ToolProjectConnection

A project connection resource.

TopLogProb

Top log probability.

TypeParam

Type.

UrlCitationBody

URL citation.

UserProfileMemoryItem

A memory item specifically containing user profile information extracted from conversations, such as preferences, interests, and personal details.

VectorStoreFileAttributes

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

WaitParam

Wait.

WebSearchActionFind

Find action.

WebSearchActionOpenPage

Open page action.

WebSearchActionSearch

Search action.

WebSearchActionSearchSources

WebSearchActionSearchSources.

WebSearchApproximateLocation

Web search approximate location.

WebSearchConfiguration

A web search configuration for bing custom search.

WebSearchPreviewTool

Web search preview.

WebSearchTool

Web search.

WebSearchToolFilters

WebSearchToolFilters.

WorkIQPreviewTool

A WorkIQ server-side tool.

WorkIQPreviewToolParameters

The WorkIQ tool parameters.

WorkflowActionOutputItem

WorkflowActionOutputItem.

Enums

AnnotationType

Type of AnnotationType.

ApplyPatchCallOutputStatus

Type of ApplyPatchCallOutputStatus.

ApplyPatchCallOutputStatusParam

Apply patch call output status.

ApplyPatchCallStatus

Type of ApplyPatchCallStatus.

ApplyPatchCallStatusParam

Apply patch call status.

ApplyPatchFileOperationType

Type of ApplyPatchFileOperationType.

ApplyPatchOperationParamType

Type of ApplyPatchOperationParamType.

AzureAISearchQueryType

Available query types for Azure AI Search tool.

ClickButtonType

Type of ClickButtonType.

ComputerActionType

Type of ComputerActionType.

ComputerEnvironment

Type of ComputerEnvironment.

ContainerMemoryLimit

Type of ContainerMemoryLimit.

ContainerNetworkPolicyParamType

Type of ContainerNetworkPolicyParamType.

ContainerSkillType

Type of ContainerSkillType.

CustomToolParamFormatType

Type of CustomToolParamFormatType.

DetailEnum

Type of DetailEnum.

FunctionAndCustomToolCallOutputType

Type of FunctionAndCustomToolCallOutputType.

FunctionCallItemStatus

Type of FunctionCallItemStatus.

FunctionShellCallEnvironmentType

Type of FunctionShellCallEnvironmentType.

FunctionShellCallItemParamEnvironmentType

Type of FunctionShellCallItemParamEnvironmentType.

FunctionShellCallItemStatus

Shell call status.

FunctionShellCallOutputOutcomeParamType

Type of FunctionShellCallOutputOutcomeParamType.

FunctionShellCallOutputOutcomeType

Type of FunctionShellCallOutputOutcomeType.

FunctionShellToolParamEnvironmentType

Type of FunctionShellToolParamEnvironmentType.

GrammarSyntax1

Type of GrammarSyntax1.

ImageDetail

Type of ImageDetail.

ImageGenActionEnum

Type of ImageGenActionEnum.

IncludeEnum

Specify additional output data to include in the model response. Currently supported values are:

  • web_search_call.action.sources: Include the sources of the web search tool call.

  • code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.

  • computer_call_output.output.image_url: Include image urls from the computer call output.

  • file_search_call.results: Include the search results of the file search tool call.

  • message.input_image.image_url: Include image urls from the input message.

  • message.output_text.logprobs: Include logprobs with assistant messages.

  • reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program).

InputFidelity

Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1 and gpt-image-1.5 and later models, unsupported for gpt-image-1-mini. Supports high and low. Defaults to low.

ItemFieldType

Type of ItemFieldType.

ItemType

Type of ItemType.

LocalShellCallOutputStatusEnum

Type of LocalShellCallOutputStatusEnum.

LocalShellCallStatus

Type of LocalShellCallStatus.

MCPToolCallStatus

Type of MCPToolCallStatus.

MemoryItemKind

Memory item kind.

MessageContentType

Type of MessageContentType.

MessageRole

Type of MessageRole.

MessageStatus

Type of MessageStatus.

ModelIdsCompaction

Model ID used to generate the response, like gpt-5 or o3. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.

OpenApiAuthType

Authentication type for OpenApi endpoint. Allowed types are:

  • Anonymous (no authentication required)

  • Project Connection (requires project_connection_id to endpoint, as setup in AI Foundry)

  • Managed_Identity (requires audience for identity based auth).

OutputContentType

Type of OutputContentType.

OutputItemType

Type of OutputItemType.

OutputMessageContentType

Type of OutputMessageContentType.

PageOrder

Type of PageOrder.

RankerVersionType

Type of RankerVersionType.

ResponseErrorCode

The error code for the response.

ResponseIncompleteReason

Reason a response finished as incomplete.

The upstream TypeSpec defines this as an inline literal union ("max_output_tokens" | "content_filter"), so the code generator emits Literal[...] instead of a named enum. This hand-written enum provides a friendlier symbolic constant for SDK consumers.

ResponseStreamEventType

Type of ResponseStreamEventType.

SearchContextSize

Type of SearchContextSize.

TextResponseFormatConfigurationType

Type of TextResponseFormatConfigurationType.

ToolCallStatus

The status of a tool call.

ToolChoiceOptions

Tool choice mode.

ToolChoiceParamType

Type of ToolChoiceParamType.

ToolType

Type of ToolType.

Functions

get_content_expanded

Return the typed content list from an ItemMessage.

If content is a plain string (the API allows a string shorthand), it is wrapped as a single MessageContentInputTextContent. If it is already a list, returns a shallow copy. Returns an empty list when content is None.

get_content_expanded(message: ItemMessage) -> list[azure.ai.agentserver.responses.models._generated.sdk.models.models._models.MessageContent]

Parameters

Name Description
message
Required

The item message.

Returns

Type Description

The message content parts.

get_conversation_expanded

Expand CreateResponse.conversation into a typed ConversationParam_2.

A plain string is treated as the conversation ID.

get_conversation_expanded(request: CreateResponse) -> ConversationParam_2 | None

Parameters

Name Description
request
Required

The create-response request.

Returns

Type Description

The typed conversation parameter, or None.

get_conversation_id

Extract conversation ID from a request or response's conversation field.

If conversation is a plain string, returns it directly. If it is a ConversationParam_2 object, returns its id field.

get_conversation_id(request: CreateResponse | ResponseObject) -> str | None

Parameters

Name Description
request
Required

The create-response request or response object.

Returns

Type Description
str | None

The conversation ID, or None if no conversation is set.

get_input_expanded

Normalize CreateResponse.input into a list of Item.

get_input_expanded(request: CreateResponse) -> list[azure.ai.agentserver.responses.models._generated.sdk.models.models._models.Item]

Parameters

Name Description
request
Required

The create-response request.

Returns

Type Description

A list of typed input items.

get_tool_choice_expanded

Expand CreateResponse.tool_choice into a typed ToolChoiceParam.

String shorthands ("auto", "required") are expanded to ToolChoiceAllowed with the corresponding mode. "none" returns None.

get_tool_choice_expanded(request: CreateResponse) -> ToolChoiceParam | None

Parameters

Name Description
request
Required

The create-response request.

Returns

Type Description

The typed tool choice, or None if unset or "none".

Exceptions

Type Description

If the tool_choice value is an unrecognized string.