From 2fc2ea673c2c8818b98a8f65f6300be2cb764a36 Mon Sep 17 00:00:00 2001 From: dariusFTOS <117190588+dariusFTOS@users.noreply.github.com> Date: Tue, 11 Feb 2025 13:55:08 +0200 Subject: [PATCH] Update AzureChatClient.cs Prevent max_tokens from also being written when making a call with OpenAI o-models --- sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs index bbe31919d709..00ff3cbb31e2 100644 --- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs +++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs @@ -135,8 +135,6 @@ private static void PostfixSwapMaxTokens(ref ChatCompletionOptions options) } writer.Flush(); - - options.SerializedAdditionalRawData["max_tokens"] = BinaryData.FromBytes(stream.ToArray()); } else {