NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet · #726 most downloaded on NuGet
The official .NET library for the OpenAI service API.
Last release 22 days ago
15 Sep 2026
Ships fairly regularly
a new release about every 5 weeks
Some releases are documented
notes for 16 of 30 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
30 releases · first in 2020
One column per quarter.
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.14.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.14.0/CHANGELOG.md
Thank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
GenerateSpeechStreamingAsyncTranscribeAudioStreamingAsyncOTEL_SEMCONV_STABILITY_OPT_IN to include gen_ai_latest_experimental to emit gen_ai.provider.name instead of gen_ai.system. The default remains compatible with OpenTelemetry GenAI Semantic Conventions v1.27.0. GenAI histograms now also advertise the recommended explicit bucket boundaries. (A community contribution, courtesy of trask)GenerateImagesStreamingAsyncGenerateImageEditsStreamingAsyncRealtimeClientCommand class hierarchy.
RealtimeClientCommandKind extensible enum.Kind property to RealtimeClientCommand.protected internal constructor to RealtimeClientCommand that takes a RealtimeClientCommandKind parameter.RealtimeServerUpdate class hierarchy.
RealtimeServerUpdateKind extensible enum.Kind property to RealtimeServerUpdate.protected internal constructor to RealtimeServerUpdate that takes a RealtimeServerUpdateKind parameter.RealtimeItem class hierarchy.
RealtimeItemKind extensible enum.Kind property to RealtimeItem.protected internal constructor to RealtimeItem that takes a RealtimeItemKind parameter.RealtimeTool class hierarchy.
RealtimeToolKind extensible enum.Kind property to RealtimeTool.protected internal constructor to RealtimeTool that takes a RealtimeToolKind parameter.ResponseTool:
CustomToolResponseItem:
CustomToolCallItemCustomToolCallOutputItemStreamingResponseUpdate:
StreamingResponseCustomToolCallInputDeltaUpdateStreamingResponseCustomToolCallInputDoneUpdateCustomToolFormat type with the following derived types:
CustomToolTextFormatCustomToolGrammarFormatCacheWriteTokenCount property to ResponseInputTokenUsageDetails.ExtraHigh and Max values to the ResponseReasoningEffortLevel extensible enum.ResponseReasoningContext extensible enum with the Auto, CurrentTurn, and AllTurns values. (A community contribution, courtesy of hogeheer499-commits)Context property to ResponseReasoningOptions. (A community contribution, courtesy of hogeheer499-commits)/realtime/, avoiding duplicate path segments. (A community contribution, courtesy of jstar0)JsonPatch not propagating correctly through certain types.Status property of the derived types of ResponseItem was not deserialized correctly when null.UsageBytes property of VectorStore was incorrectly deserialized using GetInt32() instead of GetInt64().System.ClientModel dependency to version 1.15.0. For more information, see the System.ClientModel changelog.RealtimeLogProbabilityDetails type to RealtimeTokenLogProbabilityDetails for consistency.Logprobs property of RealtimeServerUpdateConversationItemInputAudioTranscriptionCompleted to TranscriptionTokenLogProbabilities for consistency.Logprobs property of RealtimeServerUpdateConversationItemInputAudioTranscriptionDelta to TranscriptionTokenLogProbabilities for consistency.GlobalMcpToolCallApprovalPolicy type to DefaultMcpToolCallApprovalPolicy for consistency.GlobalPolicy property of McpToolCallApprovalPolicy to DefaultPolicy for consistency.UsageBytes property of VectorStore from int to long.RealtimeClient and RealtimeSessionClient are now async-only. The synchronous service and session operations they previously exposed (session and client-secret creation, sending commands and audio, receiving updates, session configuration, and conversation item helpers) have been removed, along with the underlying synchronous connection path. Use the corresponding *Async APIs instead.See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.13.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.13.0/CHANGELOG.md
Thank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
X-Stainless-Lang, X-Stainless-Package-Version, X-Stainless-Runtime, X-Stainless-Runtime-Version, X-Stainless-OS, and X-Stainless-Arch), bringing the .NET library to parity with the other official OpenAI SDKs. These restate information already present in the User-Agent header in a machine-parseable form, plus the process CPU architecture, so consumers no longer need to parse the user agent string. Any value you set yourself is preserved. The User-Agent header itself is unchanged.OpenAI.DisableTelemetry AppContext switch or the OPENAI_DISABLE_TELEMETRY environment variable. When enabled, the library sends neither the X-Stainless-* headers nor the User-Agent header that it would otherwise add. See Telemetry and privacy for details.include values on conversation item list, create, and retrieve requests were incorrectly serialized as a single comma-delimited query value instead of repeated include[] parameters, causing requests to fail with HTTP 400 responses.Kind property of ResponseContentPart could not be set correctly.Patch would not propagate correctly through the McpToolCallApprovalPolicy and CodeInterpreterToolContainer types.UserAgentApplicationId from 24 characters to 512. Application identifiers up to that length are now accepted and passed through to the User-Agent header verbatim; longer values throw ArgumentOutOfRangeException when a client is created, so that the header cannot be inflated without bound. The identifier is ignored, and the limit not applied, when telemetry is disabled and no User-Agent will be sent.OPENAI001. These types were previously marked with a dedicated OPENAICUA001 code, which has been removed. Consumers who explicitly suppressed OPENAICUA001 should suppress OPENAI001 instead (the same code already used by the other experimental Responses APIs).See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.12.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.12.0/CHANGELOG.md
Thank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
ContainerNetworkPolicy type with the following derived types:
ContainerAllowlistNetworkPolicyContainerDisabledNetworkPolicyContainerNetworkPolicyKind extensible enum.ContainerNetworkPolicyDomainSecret type.NetworkPolicy property to ContainerCreationOptions.ContainerMemoryLimit extensible enum.MemoryLimit property to ContainerCreationOptions.Name property to ContainerCollectionOptions.ConversationClient:
ConversationCreationOptions type.ConversationUpdateOptions type.ConversationDeletionResult type.ConversationResource type.ConversationClient:
CreateConversation and CreateConversationAsyncDeleteConversation and DeleteConversationAsyncGetConversation and GetConversationAsyncUpdateConversation and UpdateConversationAsyncResponsePromptCacheRetentionPolicy extensible enum.PromptCacheKey and PromptCacheRetentionPolicy properties to CreateResponseOptions.PromptCacheKey and PromptCacheRetentionPolicy properties to ResponseResult.ChatMessageContentPart.CreateImagePart(Uri) incorrectly serializing image_url.url via Uri.ToString(), which would unescape percent-encoded characters (e.g., %20 → space) and break downstream image fetches. The serialized URL now uses Uri.AbsoluteUri to preserve percent-encoding.System.ClientModel dependency to version 1.14.0. For more information, see the System.ClientModel changelog.DeleteContainerResponse to ContainerDeletionResult.DeleteContainerFileResponse to ContainerFileDeletionResult.ContainerResourceExpiresAfter to ContainerExpirationPolicy.CreateContainerBody to ContainerCreationOptions.Minutes property of ContainerExpirationPolicy to Duration.Id property of ContainerDeletionResult to ContainerId.Id property of ContainerFileDeletionResult to ContainerFileId.ExpiresAfter property of ContainerResource to ExpirationPolicy.Anchor property of ContainerExpirationPolicy from string to ContainerExpirationPolicyAnchor?.Duration property of ContainerExpirationPolicy from int to TimeSpan?.ExpiresAfter property of ContainerResource from ContainerResourceExpiresAfter to ContainerExpirationPolicy.ContainerResourceExpiresAfter class.options parameter of type RequestOptions required for several methods in the ConversationClient in order to disambiguate the new overloads.See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.11.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.11.0/CHANGELOG.md
Thank you to our developer community members who helped to make the OpenAI client library better with their contributions to this release:
ChatWebSearchContextSize extensible enum.SearchContextSize property to ChatWebSearchOptions.SkillClient with the following methods:
UploadSkill and UploadSkillAsyncUpdateSkill and UpdateSkillAsyncGetSkill and GetSkillAsyncGetSkills and GetSkillsAsyncDownloadSkill and DownloadSkillAsyncDeleteSkill and DeleteSkillAsyncUploadSkillVersion and UploadSkillVersionAsyncGetSkillVersion and GetSkillVersionAsyncGetSkillVersions and GetSkillVersionsAsyncDownloadSkillVersion and DownloadSkillVersionAsyncDeleteSkillVersion and DeleteSkillVersionAsyncResponseTokenLogProbabilityDetails type.ResponseTokenTopLogProbabilityDetails type.OutputTextTokenLogProbabilities property to ResponseContentPart.TokenLogProbabilities property to StreamingResponseOutputTextDeltaUpdate.TokenLogProbabilities property to StreamingResponseOutputTextDoneUpdate.FunctionName property to StreamingResponseFunctionCallArgumentsDoneUpdate.ResponseItem class hierarchy.
ResponseItemKind extensible enum.Kind property to ResponseItem.ResponseItem that takes a ResponseItemKind parameter.ResponseTool class hierarchy.
ResponseToolKind extensible Enum.Kind property to ResponseTool.ResponseTool that takes a ResponseToolKind parameter.StreamingResponseUpdate class hierarchy.
StreamingResponseUpdateKind extensible enum.Kind property to StreamingResponseUpdate.StreamingResponseUpdate that takes a StreamingResponseUpdateKind parameter.NullReferenceException when a streaming response delivered an unmodeled error event. The SSE error frame is now surfaced as a ClientResultException so the failure is observable, while the unknown-event path stays covered.UploadFile and UploadFileAsync method overloads in OpenAIFileClient that take a filePath were incorrectly using the entire path as the filename.AudioEndTime property of RealtimeClientCommandConversationItemTruncate was incorrectly serialized as a float instead of an integer.KnownSpeakerReferenceUris property of AudioTranscriptionOptions from IList<Uri> to IList<string>.CreateContainerFile and CreateContainerFileAsync methods of ContainerClient to UploadContainerFile and UploadContainerFileAsync.Order property of ContainerFileCollectionOptions from ContainerCollectionOrder? to ContainerFileCollectionOrder?.Options property of RealtimeClientSettings from OpenAIClientOptions to RealtimeClientOptions.AddResponsesClient and AddKeyedResponsesClient IHostApplicationBuilder extension methods under the OpenAI.Responses namespace.action and background parameters from the constructor of ImageGenerationCallResponseItem.ImageGenToolCallBackground type in favor of ImageGenerationToolBackground.ImageGenToolCallOutputFormat type in favor of ImageGenerationToolOutputFileFormat.ImageGenToolCallQuality type in favor of ImageGenerationToolQuality.ImageGenToolCallSize type in favor of ImageGenerationToolSize.Action property of ImageGenerationCallResponseItem from ImageGenerationToolAction to ImageGenerationToolAction?.Background property of ImageGenerationCallResponseItem from ImageGenToolCallBackground to ImageGenerationToolBackground?.OutputFormat property of ImageGenerationCallResponseItem from ImageGenToolCallOutputFormat to ImageGenerationToolOutputFileFormat?.Quality property of ImageGenerationCallResponseItem from ImageGenToolCallQuality to ImageGenerationToolQuality?.Size property of ImageGenerationCallResponseItem from ImageGenToolCallSize to ImageGenerationToolSize?.OutputFormat property of ImageGenerationCallResponseItem to OutputFileFormat.Options property of ResponsesClientSettings from OpenAIClientOptions to ResponsesClientOptions.options parameters in the constructors of ResponsesClient from OpenAIClientOptions to ResponsesClientOptions.ResponsesClient for consistency:
CompactResponse and CompactResponseAsyncGetInputTokenCount and GetInputTokenCountAsyncStreamingResponseTextAnnotationAddedUpdate to StreamingResponseOutputTextAnnotationAddedUpdate.See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.10.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.10.0/CHANGELOG.md
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?.See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.9.1/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.9.1/CHANGELOG.md
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.See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.9.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.9.0/CHANGELOG.md
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.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.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:
RealtimeServerUpdateConversationCreatedRealtimeServerUpdateConversationItemAddedRealtimeServerUpdateConversationItemCreatedRealtimeServerUpdateConversationItemDeletedRealtimeServerUpdateConversationItemDoneRealtimeServerUpdateConversationItemInputAudioTranscriptionCompletedRealtimeServerUpdateConversationItemInputAudioTranscriptionDeltaRealtimeServerUpdateConversationItemInputAudioTranscriptionFailedRealtimeServerUpdateConversationItemInputAudioTranscriptionSegmentRealtimeServerUpdateConversationItemRetrievedRealtimeServerUpdateConversationItemTruncatedRealtimeServerUpdateErrorRealtimeServerUpdateInputAudioBufferClearedRealtimeServerUpdateInputAudioBufferCommittedRealtimeServerUpdateInputAudioBufferDtmfEventReceivedRealtimeServerUpdateInputAudioBufferSpeechStartedRealtimeServerUpdateInputAudioBufferSpeechStoppedRealtimeServerUpdateInputAudioBufferTimeoutTriggeredRealtimeServerUpdateMcpListToolsCompletedRealtimeServerUpdateMcpListToolsFailedRealtimeServerUpdateMcpListToolsInProgressRealtimeServerUpdateOutputAudioBufferClearedRealtimeServerUpdateOutputAudioBufferStartedRealtimeServerUpdateOutputAudioBufferStoppedRealtimeServerUpdateRateLimitsUpdatedRealtimeServerUpdateResponseContentPartAddedRealtimeServerUpdateResponseContentPartDoneRealtimeServerUpdateResponseCreatedRealtimeServerUpdateResponseDoneRealtimeServerUpdateResponseFunctionCallArgumentsDeltaRealtimeServerUpdateResponseFunctionCallArgumentsDoneRealtimeServerUpdateResponseMcpCallArgumentsDeltaRealtimeServerUpdateResponseMcpCallArgumentsDoneRealtimeServerUpdateResponseMcpCallCompletedRealtimeServerUpdateResponseMcpCallFailedRealtimeServerUpdateResponseMcpCallInProgressRealtimeServerUpdateResponseOutputAudioDeltaRealtimeServerUpdateResponseOutputAudioDoneRealtimeServerUpdateResponseOutputAudioTranscriptDeltaRealtimeServerUpdateResponseOutputAudioTranscriptDoneRealtimeServerUpdateResponseOutputItemAddedRealtimeServerUpdateResponseOutputItemDoneRealtimeServerUpdateResponseOutputTextDeltaRealtimeServerUpdateResponseOutputTextDoneRealtimeServerUpdateSessionCreatedRealtimeServerUpdateSessionUpdatedModel 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.See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.8.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.8.0/CHANGELOG.md
SafetyIdentifier 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.See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.7.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.7.0/CHANGELOG.md
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 ChangeLogSee full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.6.0/CHANGELOG.md
See full changelog: https://github.com/openai/openai-dotnet/blob/OpenAI_2.6.0/CHANGELOG.md
Thank 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 ResponseMessageAnnotation and is used to cite files in the container of the Code Interpreter tool.gpt-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 GetVideoRemixAsyncClientResult 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:
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.Added the Endpoint property to AudioClient.
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.Endpoint 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.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 VectorStoreFileErrorCodeVectorStoreFileAssociationCollectionOptions 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 RemoveFileFromVectorStoreAsyncSystem.ClientModel dependency to version 1.6.1.Added the Model property to AudioClient.
Model property to AudioClient.AuthenticationPolicy to AudioClient.BatchClient:
GetBatch and GetBatchAsyncAuthenticationPolicy to BatchClient.ChatClient:
UpdateChatCompletion and UpdateChatCompletionAsyncGetChatCompletions and GetChatCompletionsAsyncGetChatCompletionMessages and GetChatCompletionMessagesAsyncModel property to ChatClient.AuthenticationPolicy to ChatClient.ContainersClient to support the Containers API with protocol methods for the following operations:
CreateContainer and CreateContainerAsyncGetContainers and GetContainersAsyncGetContainer and GetContainerAsyncDeleteContainer and DeleteContainerAsyncCreateContainerFile and CreateContainerFileAsyncGetContainerFiles and GetContainerFilesAsyncGetContainerFile and GetContainerFileAsyncGetContainerFileContent and GetContainerFileContentAsyncDeleteContainerFile and DeleteContainerFileAsyncModel property to EmbeddingClient.AuthenticationPolicy to EmbeddingClient.AuthenticationPolicy to EvaluationClient.AuthenticationPolicy to OpenAIFileClient.AuthenticationPolicy to FineTuningClient.GraderClient to support the Graders API with protocol methods for the following operations:
RunGrader and RunGraderAsyncValidateGrader and ValidateGraderAsyncModel property to ImageClient.AuthenticationPolicy to ImageClient.AuthenticationPolicy to OpenAIModelClient.Model property to ModerationClient.AuthenticationPolicy to ModerationClient.CreateSemanticVoiceActivityTurnDetectionOptions method of TurnDetectionOptions.AuthenticationPolicy to OpenAIResponseClient.AuthenticationPolicy to VectorStoreClient.ImageDetail property of MessageContent to not be serialized correctly.TranscribeAudioStreaming and TranscribeAudioStreamingAsync in the AudioClient to prevent using the whisper-1 model, which does not support streaming and simply ignores the stream parameter.AsyncWebsocketMessageResultEnumerator to prevent multiple disposals.StreamingResponseTextAnnotationAddedUpdate class to not be generated correctly as part of the set of possible handles when streaming.Status property of ReasoningResponseItem and the ReasoningStatus enum to not be generated correctly and lead to incorrect behavior.OpenAI NuGet package now contains signed binaries.System.ClientModel dependency to version 1.5.1, which contains a fix for a concurrency bug which could cause some applications running on the legacy .NET Framework to experience an infinite loop while deserializing service responses.net6.0 target framework, as this version reached end-of-life in November 2024 and is no longer maintained nor supported by Microsoft. This does not prevent using the OpenAI library on .NET 6, as the runtime will fallback to the netstandard2.0 target.Enabled support for streaming audio transcriptions:
AudioClient:
TranscribeAudioStreaming and TranscribeAudioStreamingAsyncStreamingAudioTranscriptionUpdate to work with streaming transcriptions:
StreamingAudioTranscriptionTextDeltaUpdateStreamingAudioTranscriptionTextDoneUpdateTranscriptionTokenLogProbabilities property to AudioTranscription to represent token-level log probability information.AudioTranscriptionIncludes enum and Includes property to AudioTranscriptionOptions to request additional information in the transcription response.GeneratedSpeechVoice.Instructions property to SpeechGenerationOptions to control the voice of the generated audio with additional instructions.Rehydrate method overloads that receive a batch ID instead of rehydration token.ChatClient:
DeleteChatCompletion and DeleteChatCompletionAsyncGetChatCompletion and GetChatCompletionAsyncAac format to ChatOutputAudioFormat.ChatOutputAudioVoice.EvaluationClient to support the Evaluations API with protocol methods for the following operations:
CreateEvaluation and CreateEvaluationAsyncGetEvaluation and GetEvaluationAsyncGetEvaluations and GetEvaluationsAsyncUpdateEvaluation and UpdateEvaluationAsyncDeleteEvaluation and DeleteEvaluationAsyncCreateEvaluationRun and CreateEvaluationRunAsyncGetEvaluationRun and GetEvaluationRunAsyncGetEvaluationRuns and GetEvaluationRunsAsyncCancelEvaluationRun and CancelEvaluationRunAsyncDeleteEvaluationRun and DeleteEvaluationRunAsyncGetEvaluationRunOutputItem and GetEvaluationRunOutputItemAsyncGetEvaluationRunOutputItems and GetEvaluationRunOutputItemsAsyncFineTuningClient:
GetFineTuningCheckpointPermissions and GetFineTuningCheckpointPermissionsAsyncCreateFineTuningCheckpointPermission and CreateFineTuningCheckpointPermissionAsyncDeleteFineTuningCheckpointPermission and DeleteFineTuningCheckpointPermissionPauseFineTuningJob and PauseFineTuningJobAsyncResumeFineTuningJob and ResumeFineTuningJobAsyncUsage property to GeneratedImageCollection to represent image token usage information.Background property to ImageGenerationOptions to set transparency for the background of the generated image(s).ModerationLevel property to ImageGenerationOptions to control the content-moderation level for generated image(s).OutputCompressionFactor property to ImageGenerationOptions to set the compression level (0-100%) for the generated images.OutputFileFormat property to ImageGenerationOptions to set the file format in which the generated images are returned.GeneratedImageSize enum.OpenAIResponseClient:
CancelResponse and CancelResponseAsyncGetResponseStreaming and GetResponseStreamingAsync.Linux property to ComputerToolEnvironment.Background property to ResponseCreationOptions to support background mode.SequenceNumber property to StreamingResponseUpdate to support background mode while streaming.InputTokenDetails property to ResponseTokenUsage to represent token usage information.EncryptedContent property to ReasoningResponseItem to represent the encrypted content of the reasoning item.VectorStoreClient:
RetrieveVectorStoreFileContent and RetrieveVectorStoreFileContentAsyncSearchVectorStore and SearchVectorStoreAsyncUpdateVectorStoreFileAttributes and UpdateVectorStoreFileAttributesAsyncSizeInBytesLong property to OpenAIFile to correctly represent the size of a file.ReasoningSummaryVerbosity property of ResponseReasoningOptions was sending the wrong property to the service.CreateInputFilePart method of ResponseContentPart not being able to send files as BinaryData.BinaryContent.ClientResult to a model.GetRealtimeConversationClient method from OpenAIClient to GetRealtimeClient.FineTuningJobOperation class to FineTuningJob.CreateFineTuningJob, GetJob, and GetJobs and added convenience methods for them.OpenAI.Conversations to OpenAI.Realtime. All APIs and types related to real-time conversations have been moved to the new OpenAI.Realtime namespace.SummaryTextParts property of ReasoningResponseItem in favor a new property called SummaryParts.FileSearchCallResponseItem(IEnumerable<string> queries, IEnumerable<FileSearchCallResult> results)FunctionCallOutputResponseItem(string callId, string functionOutput)FunctionCallResponseItem(string callId, string functionName, BinaryData functionArguments)CallId and Output in ComputerCallOutputResponseItemAction, CallId, and Status in ComputerCallResponseItemResults and Status in FileSearchCallResponseItemCallId in FunctionCallOutputResponseItemCallId in FunctionCallResponseItemAttributes in FileSearchCallResult is now IReadOnlyDictionary<string, BinaryData> instead of IDictionary<string, BinaryData>.Status properties are now nullable in multiple response item types.Code in ResponseError is now ResponseErrorCode instead of string.WebSearchToolContextSize extensible enum to WebSearchContextSize.WebSearchToolLocation class to WebSearchUserLocation.vectorStore to options in CreateVectorStore and ModifyVectorStore methods in VectorStoreClient.Added a Content property to RunStepFileSearchResult (`step_details.tool_calls.file_search.results.content` in the REST API).
Content property to RunStepFileSearchResult (step_details.tool_calls.file_search.results.content in the REST API). (bf3f0ed)
FileSearchRankingOptions and FileSearchResults properties to RunStepDetailsUpdate. (bf3f0ed)RunStepType to RunStepKind. (bf3f0ed)RunStepKind from an "extensible enum" to a regular enum. (bf3f0ed)ToolCallId property of RunStepToolCall to Id. (bf3f0ed)ToolKind property of RunStepToolCall to Kind. (bf3f0ed)FileSearchRanker and FileSearchScoreThreshold properties of RunStepToolCall with a new FileSearchRankingOptions property that contains both values to make it clearer how they are related. (bf3f0ed)> The following breaking changes only apply when upgrading from the previous 2.0.0-beta.* versions.
[!NOTE] First stable version of the official OpenAI library for .NET.
[!NOTE] The following breaking changes only apply when upgrading from the previous 2.0.0-beta.* versions.
ChatMessageContent to encapsulate the representation of content parts in ChatMessage, ChatCompletion, and StreamingChatCompletionUpdate. (31c2ba6)BinaryData in ChatToolCall, StreamingChatToolCallUpdate, ChatFunctionCall, and StreamingChatFunctionCallUpdate. (31c2ba6)OpenAIClientOptions's ApplicationId to UserAgentApplicationId. (31c2ba6)StreamingChatToolCallUpdate's Id to ToolCallId. (31c2ba6)StreamingChatCompletionUpdate's Id to CompletionId. (31c2ba6)Auto and None in the deprecated ChatFunctionChoice with CreateAutoChoice() and CreateNoneChoice(). (31c2ba6)ChatFunctionChoice(ChatFunction) constructor with CreateNamedChoice(string functionName). (31c2ba6)FileClient to OpenAIFileClient and the corresponding GetFileClient() method in OpenAIClient to GetOpenAIFileClient(). (31c2ba6)ModelClient to OpenAIModelClient and the corresponding GetModelClient() method in OpenAIClient to GetOpenAIModelClient(). (31c2ba6)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →