Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.48k stars 4.81k forks source link

[BUG] HTTP 400: Unrecognized request argument supplied: parallel_tool_calls #45719

Open SergeyMenshykh opened 2 months ago

SergeyMenshykh commented 2 months ago

Library name and version

Azure.AI.OpenAI 2.0.0-beta.3

Describe the bug

Setting the ChatCompletionOptions.ParallelToolCallsEnabled property to true or false fails on gpt-4o (v. 2024-05-13), gpt-4 (v. 0613) models/deployments. Works perfectly fine on gpt-4o-mini (v. 2024-07-18)

Expected behavior

Setting the ChatCompletionOptions.ParallelToolCallsEnabled property to true or false while working with models specified above should not result in an exception, and the property should be correctly recognized and processed.

Actual behavior

Setting the ChatCompletionOptions.ParallelToolCallsEnabled property to true or false leads to the exception 'HTTP 400 (invalid_request_error: Unrecognized request argument supplied: parallel_tool_calls).' Assigning a null value or not assigning any value to the property works.

Reproduction Steps

  1. Create an instance of the ChatCompletionOptions class and set the ParallelToolCallsEnabled property to true or false.
  2. Create an instance of the AzureOpenAIClient class and invoke the CompleteChatAsync method with the options created in the first step.
  3. Specify either of the deployments: gpt-4o (v. 2024-05-13), gpt-4 (v. 0613)
var azureClient = new AzureOpenAIClient(endpoint, apiKey, options);

var options = new ChatCompletionOptions() { ParallelToolCallsEnabled = true  };

await azureClient.GetChatClient(...).CompleteChatAsync(..., chatOptions:options, ...)

Environment

.NET8.0

github-actions[bot] commented 2 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @ralph-msft @trrwilson.

SergeyMenshykh commented 2 months ago

cc: @trrwilson