Skip to content

Title: Error BadRequestError: 400 Additional properties are not allowed ('parsed', 'refusal' were unexpected) #503

@moti-malka

Description

@moti-malka

Bug Report: BadRequestError 400 - Unexpected Properties in OpenAI API Response (Function Call to Azure AI Search)

Description

When making a function call to Azure AI Search using the OpenAI API, I
encountered a error: BadRequestError: 400 Additional properties are not allowed ('parsed', 'refusal' were unexpected) - 'messages.2'

Error Details

BadRequestError: 400 Additional properties are not allowed ('parsed', 'refusal' were unexpected) - 'messages.2' at APIError.generate (openai/error.mjs:58:20) at OpenAI.makeStatusError (openai/core.mjs:338:65) at OpenAI.makeRequest (openai/core.mjs:389:30) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ChatCompletionStreamingRunner._createChatCompletion (openai/lib/ChatCompletionStream.mjs:73:24) at async ChatCompletionStreamingRunner._runTools (openai/lib/AbstractChatCompletionRunner.mjs:252:36)

Expected Behavior

The OpenAI API should process the function call to Azure AI Search successfully without returning an error for unexpected properties.

Actual Behavior

The request fails with a BadRequestError due to additional properties that are not allowed in the response.

Steps to Reproduce

  1. Make a function call to Azure AI Search via the OpenAI API.
  2. Pass a valid payload.
  3. Observe the error response.

Environment

  • API Endpoint: OpenAI ChatCompletion Streaming
  • Function Call Target: Azure AI Search
  • Region: Sweden Central
  • Library Version: OpenAI SDK 4.26.0
  • Date of Occurrence: March 11, 2025

Additional Information

  • Request ID: 0fe457bc-cdcf-4345-9f1c-d86ed3559fe5
  • Error Type: invalid_request_error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions