github Azure/azure-sdk-for-net Azure.AI.OpenAI_2.2.0-beta.1

pre-release21 hours ago

2.2.0-beta.1 (2025-02-07)

This preview release aligns with the corresponding 2.2.0 beta of OpenAI and the 2025-01-01-Preview Azure OpenAI Service API version.

New features include since 2.1.0-beta.2 include:

  • Audio input for Chat Completions using gpt-4o-audio-preview or other compatible models: provide input audio via ChatMessageContentPart.CreateInputAudioPart(), set AudioOptions and ResponseModalities on ChatCompletionOptions, retrieve response audio via OutputAudio on ChatCompletion, and reference audio history from the assistant by using the AssistantChatMessage(ChatCompletion) constructor or using ChatMessageContentPart.CreateAudioPart(string). For more information, refer to the examples in the OpenAI README.
  • Predicted outputs in Chat Completions: ChatCompletionOptions accepts an OutputPrediction property that can be used via ChatOutputPrediction.CreateStaticContentPrediction() with text content to optimize operation efficiency for scenarios like code completion. For more information, see OpenAI's predicted outputs announcement.
  • Chat Completions o-series model feature support: the new developer message role via DeveloperChatMessage (used just like SystemChatMessage), ReasoningEffortLevel on Chat Completion options
  • [AOAI exclusive] UserSecurityContext integration with Defender for Cloud; add a UserSecurityContext instance to ChatCompletionOptions with SetUserSecurityContext()

Breaking Changes

  • Batch: files uploaded for batch operations (UploadFile with FileUploadPurpose.Batch) will now report a status of processed, matching expected behavior against OpenAI's /v1 endpoint. This is a change from past behavior where such files would initially report pending and a later processed, error, or other status depending on operation progress. Batch input validation is instead consistently performed from the batch client.

Don't miss a new azure-sdk-for-net release

NewReleases is sending notifications on new releases.