Diarized value to the AudioTranscriptionFormat extensible enum.KnownSpeakerNames and KnownSpeakerReferenceUris properties to AudioTranscriptionOptions.TranscribeAudioDiarized and TranscribeAudioDiarizedAsync methods to the AudioClient.StreamingAudioTranscriptionUpdate:
StreamingAudioTranscriptionTextSegmentUpdateGenerateSpeechStreaming and GenerateSpeechStreamingAsync methods to the AudioClient.StreamingSpeechUpdate type with the following derived types:
StreamingSpeechAudioDeltaUpdateStreamingSpeechAudioDoneUpdateAudioClient:
CreateVoice and CreateVoiceAsyncCreateVoiceConsent and CreateVoiceConsentAsyncDeleteVoiceConsent and DeleteVoiceConsentAsyncGetVoiceConsent and GetVoiceConsentAsyncGetVoiceConsents and GetVoiceConsentsAsyncUpdateVoiceConsent and UpdateVoiceConsentAsyncChunkingStrategy property to AudioTranscriptionOptions.Usage property to AudioTranscription.AudioTranscriptionUsage type with the following derived types:
AudioTranscriptionTokenUsageAudioTranscriptionDurationUsageSpeechTokenUsage type.ResponseTool:
ApplyPatchToolResponseItem:
ApplyPatchCallItemApplyPatchCallOutputItemApplyPatchOperation type with the following derived types:
ApplyPatchCreateFileOperationApplyPatchDeleteFileOperationApplyPatchUpdateFileOperationAction property to WebSearchCallResponseItem.WebSearchAction type with the following derived types:
WebSearchFindInPageActionWebSearchOpenPageActionWebSearchSearchActionWebSearchCallActionSources value to the IncludedResponseProperty extensible enum.WebSearchActionSource type with the following derived types:
WebSearchActionUriSourceAction property to ImageGenerationTool.ImageGenerationToolAction extensible enum with values Generate, Edit, and Auto.Description property to VectorStoreCreationOptions.\/ or \u002F for /) failed to decode, causing a FormatException. Per RFC 8259 §7, these are valid JSON representations that the OpenAI API may produce.ConfigurationSchema.json to the NuGet package via the MSBuild JsonSchemaSegment feature, enabling automatic JSON IntelliSense and validation for appsettings.json when configuring OpenAI clients. Provides per-client model suggestions and OpenAI-specific options, composing with System.ClientModel's base credential and pipeline definitions.Bytes property of ContainerFileResource to SizeInBytes and changed its type from int to long?.MessageOutputTextLogprobs value of the IncludedConversationItemProperty extensible enum to MessageOutputTextLogProbabilities.limit parameter in the GetConversationItems and GetConversationItemsAsync protocol methods from long? to int?.limit parameter in the GetFiles and GetFilesAsync protocol methods from long? to int?.InputImageUri property of ResponseContentPart from Uri to string.ImageUri property of ImageGenerationToolInputImageMask from Uri to string.Size property of VectorStoreFile to UsageInBytes and changes its type from int to long?.limit parameter in the GetVideo and GetVideosAsync protocol methods from long? to int?.InputFileUri property and CreateInputFilePart(Uri) factory method to ResponseContentPart to support file URL inputs.Microsoft.SourceLink.GitHub was inadvertently included as a runtime dependency of the package, causing downstream build failures with "Source control information is not available" errors. The package is now correctly treated as a build-only dependency.JsonPatch customizations applied to ChatCompletionOptions were lost when the options were cloned internally before an API call.Thank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
AudioClient configuration and dependency injection via the new AudioClientSettings class.BatchClient configuration and dependency injection via the new BatchClientSettings class.ChatClient configuration and dependency injection via the new ChatClientSettings class.None to ChatReasoningEffortLevel enum to allow opting out of reasoning.ContainerClient configuration and dependency injection via the new ContainerClientSettings class.ConversationClient configuration and dependency injection via the new ConversationClientSettings class.EmbeddingClient configuration and dependency injection via the new EmbeddingClientSettings class.EvaluationClient configuration and dependency injection via the new EvaluationClientSettings class.OpenAIFileClient configuration and dependency injection via the new OpenAIFileClientSettings class.GetFiles and GetFilesAsync methods in the OpenAIFileClient.FineTuningClient configuration and dependency injection via the new FineTuningClientSettings class.GraderClient configuration and dependency injection via the new GraderClientSettings class.ImageClient configuration and dependency injection via the new ImageClientSettings class.HighQuality to GeneratedImageQuality enum to allow generating higher quality images.ChatCompletionOptions argument when the same instance was passed into concurrent calls of CompleteChat/CompleteChatAsync and/or CompleteChatStreaming/CompleteChatStreamingAsync.RealtimeSessionClient.RealtimeSessionClient always requiring an API key.CreateResponseOptions argument when the same instance was passed into concurrent calls of CreateResponse/CreateResponseAsync and/or CreateResponseStreaming/CreateResponseStreamingAsync.System.ClientModel dependency to version 1.9.0. For more information, see the System.ClientModel changelog.InputTokenCount, OutputTokenCount, and TotalTokenCount properties of ImageTokenUsage from int to long.RealtimeSession to RealtimeSessionClient.ConversationTool to RealtimeTool and exposed all supported tools as derived types:
RealtimeFunctionToolRealtimeMcpToolRealtimeItem into a class hierarchy and exposed all supported item types as derived types:
RealtimeMessageItemRealtimeFunctionCallItemRealtimeFunctionCallOutputItemRealtimeMcpToolCallItemRealtimeMcpToolDefinitionListItemRealtimeMcpToolCallApprovalRequestItemRealtimeMcpToolCallApprovalResponseItemRealtimeUpdate to RealtimeServerUpdate and exposed all supported server events as derived types:
RealtimeServerUpdateConversationCreatedRealtimeServerUpdateConversationItemAddedRealtimeServerUpdateConversationItemCreatedRealtimeServerUpdateConversationItemDeletedRealtimeServerUpdateConversationItemDoneRealtimeServerUpdateConversationItemInputAudioTranscriptionCompletedRealtimeServerUpdateConversationItemInputAudioTranscriptionDeltaRealtimeServerUpdateConversationItemInputAudioTranscriptionFailedRealtimeServerUpdateConversationItemInputAudioTranscriptionSegmentRealtimeServerUpdateConversationItemRetrievedRealtimeServerUpdateConversationItemTruncatedRealtimeServerUpdateErrorRealtimeServerUpdateInputAudioBufferClearedRealtimeServerUpdateInputAudioBufferCommittedSafetyIdentifier property to ChatCompletionOptions, which enables users to specify a stable identifier that can be used to help detect end-users of their application that may be violating OpenAI's usage policies.SafetyIdentifier property to CreateResponseOptions and ResponseResult, which enables users to specify a stable identifier that can be used to help detect end-users of their application that may be violating OpenAI's usage policies.ConversationOptions property to CreateResponseOptions and ResponseResult, which enables users to automatically manage the state of a conversation in a multi-turn interaction by persisting state and sharing context across subsequent responses, rather than having to chain multiple response items together.MaxToolCallCount property to CreateResponseOptions and ResponseResult, which enables users to set the maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.TopLogProbabilityCount property to CreateResponseOptions and ResponseResult, which enables users to specify the number of most likely tokens to return at each token position, each with an associated log probability.IncludedProperties property to CreateResponseOptions, which enables users to specify additional output data to be included in the model response.Id property of ResponseItem.Status property of the types derived from ResponseItem.[Experimental] attribute. As we prepare to stabilize it and remove its experimental designation, we are cleaning up the APIs to better align them with the service REST APIs, as well as to offer more flexibility and improve usability. See our examples for helpful references on how to use the updated APIs.
OpenAIResponseClient class has been renamed to ResponsesClient.ResponseCreationOptions class has been renamed to CreateResponseOptions.OpenAIResponse class has been renamed to ResponseResult.CreateResponse, CreateResponseAsync, CreateResponseStreaming and CreateResponseStreamingAsync methods of the ResponsesClient with a CreateResponseOptions argument, the input items must now be specified via the new InputItems property of CreateResponseOptions.CreateResponseStreaming and CreateResponseStreamingAsync methods of the ResponsesClient with a CreateResponseOptions argument, the StreamingEnabled property of CreateResponseOptions must be set to true.OpenAIResponsesModelFactory class used for mocking output models (e.g., ResponseResult, ResponseTokenUsage, etc.) has been removed in favor of adding setters to the properties of these models.Thank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
WebSearchTool class, with a separate WebSearchPreviewTool class for preview web search features.Filename property to FileCitationMessageAnnotation to provide the name of the cited file.StreamingResponseReasoningTextDeltaUpdate and StreamingResponseReasoningTextDoneUpdate for reasoning text events.StreamingResponseReasoningSummaryPartAddedUpdate and StreamingResponseReasoningSummaryPartDoneUpdate for reasoning summary part events.StreamingResponseReasoningSummaryTextDeltaUpdate and StreamingResponseReasoningSummaryTextDoneUpdate for reasoning summary text events.MessageCreationAttachment that prevented proper handling of file attachments in message creation. (A community contribution, courtesy of BenjaminDavidPinter)partial_image_b64 in StreamingResponseImageGenerationCallPartialImageUpdate to ensure correct serialization of partial image data in streaming responses.Patch properties by adding the JsonIgnore attribute, preventing System.InvalidOperationException when using JsonSerializer without the custom converter.System.ClientModel dependency to version 1.8.1 to adopt bug fixes for JSON Patch. For more context, see the System.ClientModel ChangeLogThank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
Minimal property to ChatReasoningEffortLevel. (A community contribution, courtesy of kurnakovv)JsonPatch, which enables users to get and set additional JSON properties in response and request payloads.
ConversationClient to support the Conversations API with protocol methods for the following operations:
CreateConversation and CreateConversationAsyncGetConversation and GetConversationAsyncUpdateConversation and UpdateConversationAsyncDeleteConversation and DeleteConversationAsyncCreateConversationItems and CreateConversationItemsAsyncGetConversationItems and GetConversationItemsAsyncDeleteConversationItem and DeleteConversationItemAsyncJsonPatch, which enables users to get and set additional JSON properties in response and request payloads.
Minimal property to ResponseReasoningEffortLevel. (A community contribution, courtesy of kurnakovv)ContainerFileCitationMessageAnnotation class which is derived from and is used to cite files in the container of the Code Interpreter tool.ClientResult that were missing in the AudioTranscription and AudioTranslation classes.ContentParts property that was missing in the ChatCompletionMessageListDatum class.GetContainerFileContent and GetContainerFileContentAsync methods of ContainerClient to DownloadContainerFile and DownloadContainerFileAsync.GetInputItems and GetInputItemsAsync methods of the OpenAIResponseClient in favor of the existing GetResponseInputItems and GetResponseInputItemsAsync methods.Thank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
Model property to OpenAIResponseClient. (A community contribution, courtesy of BenjaminDavidPinter)ServiceDescription property to McpTool.ConnectorId property to McpTool.AuthorizationToken property to McpTool.CodeInterpreterTool to the Tools property of their ResponseCreationOptions and configure it.
Container property to configure the sandboxed environment, including any files that should be made available.McpToolCallApprovalRequestItem not taking the item ID as a parameter. MCP approval requests are correlated to MCP approval responses using this ID, which implies that this ID should be required.StreamingResponseUpdate classes missing the ItemId and OutputIndex properties.Endpoint property to AudioClient.Endpoint property to BatchClient.Endpoint property to ChatClient.ServiceTier property to ChatCompletionOptions, ChatCompletion, and StreamingChatCompletionUpdate to configure the policy that the server will use to process the request in terms of pricing, performance, etc.ChatCompletion and ChatCompletionDeletionResult to convert from ClientResult.Endpoint property to ContainerClient.ContainerClient that use the strongly-typed model classes.ContainerClient:
GetContainers and GetContainersAsyncGetContainerFiles and GetContainerFilesAsyncContainerResource, ContainerFileResource, DeleteContainerResponse, and DeleteContainerFileResponse to convert from ClientResult.Endpoint property to EmbeddingsClient.OpenAIEmbeddingCollection to convert from ClientResult.Endpoint property to EvaluationClient.Endpoint property to OpenAIFileClient.OpenAIFile, OpenAIFileCollection, and FileDeletionResult to convert from ClientResult.Endpoint property to FineTuningClient.ResponseItem (such as ReasoningResponseItem) missing some constructors or property setters, which made it difficult to use them as inputs.RealtimeClient that was preventing the following methods from working correctly:
CreateEphemeralToken and CreateEphemeralTokenAsyncCreateEphemeralTranscriptionToken and CreateEphemeralTranscriptionTokenAsyncoptions parameter of the GetChatCompletionMessages method of the ChatClient from ChatCompletionCollectionOptions to ChatCompletionMessageCollectionOptions.RequestOptions parameter for a new RealtimeSessionOptions parameter and a CancellationToken parameter.Background property to BackgroundModeEnabled for clarity.ComputerOutput class to ComputerCallOutput.Delta property of StreamingResponseFunctionCallArgumentsDeltaUpdate from string to BinaryData.Arguments property of StreamingResponseFunctionCallArgumentsDoneUpdate from string to BinaryData and renamed it to FunctionArguments.WebSearchContextSize class to WebSearchToolContextSize.WebSearchUserLocation class to WebSearchToolLocation.ResponseItem.ResponseTool.ResponseMessageAnnotation except for the Kind property and moved them to the new derived types.OperationResult pattern along with the CreateVectorStoreOperation AddFileToVectorStoreOperation, and CreateBatchFileJobOperation classes.VectorStoreBatchFileJob class to VectorStoreFileBatchVectorStoreFileAssociation class to VectorStoreFileVectorStoreFileAssociationError class to VectorStoreFileErrorVectorStoreFileAssociationStatus class to VectorStoreFileStatusVectorStoreFileAssociationErrorCode class to VectorStoreFileErrorCodeSystem.ClientModel dependency to version 1.6.1.InputFidelity property to ImageEditOptions to control how closely distinctive features from the input are preserved.OutputCompressionFactor property to ImageEditOptions to set the compression level (0-100%) for jpeg or webp outputs.OutputFileFormat property to ImageEditOptions to set the file format in which the generated images are returned.Background property to GeneratedImageCollection.OutputFileFormat property to GeneratedImageCollection.Quality property to GeneratedImageCollection.Size property to GeneratedImageCollection.OpenAIModelClient configuration and dependency injection via the new OpenAIModelClientSettings class.ModerationClient configuration and dependency injection via the new ModerationClientSettings class.ClassifyInputs and ClassifyInputsAsync methods in the ModerationClient.
ModerationInputPart class to create text or image inputs for classification.ApplicableInputKinds property of the ModerationCategory class to understand to which parts of the input the moderation results apply.RealtimeClient configuration and dependency injection via the new RealtimeClientSettings class.RealtimeMcpTool to the Tools property of their RealtimeConversationSessionOptions and configure it.
AllowedTools property to limit which of the server tools can be called by the model.ToolCallApprovalPolicy property to specify which tools require an explicit approval before being called by the model.AuthorizationToken property to specify the access token to used when authenticating with the remote MCP server.ConnectorId property to use the OpenAI-maintained MCP wrappers for popular services like Microsoft Outlook or Dropbox.RealtimeClientCommand class that represents client events to be used with the new SendCommand and SendCommandAsync overloads in the RealtimeSessionClient and exposed all supported client events as derived types:
RealtimeClientCommandConversationItemCreateRealtimeClientCommandConversationItemDeleteRealtimeClientCommandConversationItemRetrieveRealtimeClientCommandConversationItemTruncateRealtimeClientCommandInputAudioBufferAppendRealtimeClientCommandInputAudioBufferClearRealtimeClientCommandInputAudioBufferCommitRealtimeClientCommandOutputAudioBufferClearRealtimeClientCommandResponseCancelRealtimeClientCommandResponseCreateRealtimeClientCommandSessionUpdateJsonPatch, which enables users to get and set additional JSON properties in response and request payloads.ResponsesClient configuration and dependency injection via the new ResponsesClientSettings class.CompactResponse and CompactResponseAsync protocol methods in the ResponsesClient.GetInputTokenCount and GetInputTokenCountAsync protocol methods in the ResponsesClient.None to ResponseReasoningEffortLevel enum to allow opting out of reasoning.InputImageUri property to ResponseContentPart to manage image inputs as URIs.McpToolCallApprovalPolicy to facilitate its assignment.VectorStoreClient configuration and dependency injection via the new VectorStoreClientSettings class.VideoClient configuration and dependency injection via the new VideoClientSettings class.RealtimeServerUpdateInputAudioBufferDtmfEventReceivedRealtimeServerUpdateInputAudioBufferSpeechStartedRealtimeServerUpdateInputAudioBufferSpeechStoppedRealtimeServerUpdateInputAudioBufferTimeoutTriggeredRealtimeServerUpdateMcpListToolsCompletedRealtimeServerUpdateMcpListToolsFailedRealtimeServerUpdateMcpListToolsInProgressRealtimeServerUpdateOutputAudioBufferClearedRealtimeServerUpdateOutputAudioBufferStartedRealtimeServerUpdateOutputAudioBufferStoppedRealtimeServerUpdateRateLimitsUpdatedRealtimeServerUpdateResponseContentPartAddedRealtimeServerUpdateResponseContentPartDoneRealtimeServerUpdateResponseCreatedRealtimeServerUpdateResponseDoneRealtimeServerUpdateResponseFunctionCallArgumentsDeltaRealtimeServerUpdateResponseFunctionCallArgumentsDoneRealtimeServerUpdateResponseMcpCallArgumentsDeltaRealtimeServerUpdateResponseMcpCallArgumentsDoneRealtimeServerUpdateResponseMcpCallCompletedRealtimeServerUpdateResponseMcpCallFailedRealtimeServerUpdateResponseMcpCallInProgressRealtimeServerUpdateResponseOutputAudioDeltaRealtimeServerUpdateResponseOutputAudioDoneRealtimeServerUpdateResponseOutputAudioTranscriptDeltaRealtimeServerUpdateResponseOutputAudioTranscriptDoneRealtimeServerUpdateResponseOutputItemAddedRealtimeServerUpdateResponseOutputItemDoneRealtimeServerUpdateResponseOutputTextDeltaRealtimeServerUpdateResponseOutputTextDoneRealtimeServerUpdateSessionCreatedRealtimeServerUpdateSessionUpdatedModel property of the ResponsesClient in favor of specifying the model on a per-call basis when calling CreateResponse/CreateResponseAsync or CreateResponseStreaming/CreateResponseStreamingAsync. To do this, set the Model property of the CreateResponseOptions parameter. With this change, users no longer have to provide a model unless it is actually needed.Instructions property of ResponseResult from string to IList<ResponseItem> to handle multi-item instructions.ResponseMessageAnnotationgpt-image-1.
ImageGenerationTool to the Tools property of their ResponseCreationOptions and configure it using properties such as Background, Quality, Size, and more.JsonPatch, which enables users to get and set additional JSON properties in response and request payloads.
VideoClient to support the Videos API with protocol methods for the following operations:
CreateVideo and CreateVideoAsyncGetVideo and GetVideoAsyncDeleteVideo and DeleteVideoAsyncDownloadVideo and DownloadVideoAsyncGetVideos and GetVideosAsyncCreateVideoRemix and GetVideoRemixAsyncEndpoint property to GraderClient.RunGraderResponse and ValidateGraderResponse to convert from ClientResult.Endpoint property to ImageClient.GeneratedImageCollection to convert from ClientResult.Background property to ImageEditOptions to set transparency for the background of the generated image(s).Quality property to ImageEditOptions to set the quality of the generated image(s).Endpoint property to ImageClient.GeneratedImageCollection to convert from ClientResult.Background property to ImageEditOptions to set transparency for the background of the generated image(s).Quality property to ImageEditOptions to set the quality of the generated image(s).Endpoint property to OpenAIModelClient.OpenAIModel, OpenAIModelCollection, and ModelDeletionResult to convert from ClientResult.Endpoint property to ModerationClient.ModerationResultCollection to convert from ClientResult.RealtimeClient.AuthenticationPolicy to RealtimeClient.Endpoint property to RealtimeClient.RequestOptions parameter of the following methods of RealtimeClient for a new RealtimeSessionOptions parameter and a CancellationToken parameter:
StartConversationSession and StartConversationSessionAsyncStartTranscriptionSession and StartTranscriptionSessionAsyncStartSession and StartSessionAsyncEndpoint property to OpenAIResponseClient.OpenAIResponse to convert from ClientResult.ResponseTool to facilitate certain scenarios:
FunctionToolFileSearchToolWebSearchToolComputerToolMcpTool to the Tools property of their ResponseCreationOptions and configure it.
AllowedTools property to limit which of the server tools can be called by the model.ToolCallApprovalPolicy property to specify which tools require an explicit approval before being called by the model.McpTool via the ToolChoice property is coming soon.McpTool with an access token that can be used to authenticate with the remote MCP server is coming soon.ResponseMessageAnnotation to facilitate certain scenarios:
FileCitationMessageAnnotationFilePathMessageAnnotationUriCitationMessageAnnotationServiceTier property to ResponseCreationOptions, OpenAIResponse, and StreamingChatCompletionUpdate to configure the policy that the server will use to process the request in terms of pricing, performance, etc.Endpoint property to OpenAIResponseClient.VectorStore, VectorStoreFile, VectorStoreFileBatch, VectorStoreDeletionResult, and FileFromStoreRemovalResult to convert from ClientResult.VectorStoreFileAssociationCollectionOptions class to VectorStoreFileCollectionOptionsVectorStoreFileAssociationCollectionOrder class to VectorStoreFileCollectionOrderCancelBatchFileJob and CancelBatchFileJobAsync methods of VectorStoreClient to CancelVectorStoreFileBatch and CancelVectorStoreFileBatchAsyncCreateBatchFileJob and CreateBatchFileJobAsync methods of VectorStoreClient to AddFileBatchToVectorStore and AddFileBatchToVectorStoreAsyncGetBatchFileJob and GetBatchFileJobAsync methods of VectorStoreClient to GetVectorStoreFileBatch and GetVectorStoreFileBatchAsyncGetFileAssociation and GetFileAssociationAsync methods of VectorStoreClient to GetVectorStoreFile and GetVectorStoreFileAsyncGetFileAssociations and GetFileAssociationsAsync methods of VectorStoreClient to GetVectorStoreFiles and GetVectorStoreFilesAsyncGetFileAssociationsInBatch and GetFileAssociationsInBatchAsync methods of VectorStoreClient to GetVectorStoreFilesInBatch and GetVectorStoreFilesInBatchAsyncRemoveFileFromStore and RemoveFileFromStoreAsync methods of VectorStoreClient to RemoveFileFromVectorStore and RemoveFileFromVectorStoreAsync