Skip to content

CreateResponse fails with 400 when ResponseReasoningOptions.ReasoningSummaryVerbosity argument included #457

Open
@rafCodes

Description

@rafCodes

Service

Azure OpenAI

Describe the bug

When getting a response from the OpenAIResponseClient, if the ReasoningSummaryVerbosity to the ResponseReasoningOptions to have a summary of the chain of thought process, it fails with a 400 error as seen below:

<title>Document</title>
  Name Value Type
  Message "HTTP 400 (invalid_request_error: unknown_parameter)\r\nParameter: reasoning.generate_summary\r\n\r\nUnknown parameter: 'reasoning.generate_summary'." string

No error occurs if only the ReasoningEffortLevel is included in the ResponseCreationOptions and it also fails if only the ReasoningSummaryVerbosity is added.

Image of error and code:
Image

Steps to reproduce

Run the code below.

This code is derived from the ResponseTests.cs in this repository:

public async Task ResponsesWithReasoning()

Code snippets

public void test()    
{
        string yourEndpoint = "";
        string yourKey = "";

        AzureOpenAIClient azureClient = new(new Uri(yourEndpoint), new ApiKeyCredential(yourKey));

        OpenAIResponseClient client = azureClient.GetOpenAIResponseClient("o4-mini");

        ResponseCreationOptions options = new()
        {
            ReasoningOptions = new()
            {
                ReasoningEffortLevel = ResponseReasoningEffortLevel.Low,
                ReasoningSummaryVerbosity = ResponseReasoningSummaryVerbosity.Detailed,
            },
            Metadata =
            {
                ["superfluous_key"] = "superfluous_value",
            },
            Instructions = "Perform reasoning over any questions asked by the user.",
        };

        OpenAIResponse response = client.CreateResponse("What is the best way to fold a burrito?", options);
}

OS

winOS

.NET version

8

Library version

2.2.0-beta.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions