Function calling does not return the type:object parameter

Why is configuration not returned in OpenAI function output , but returned when schema is empty?

Hello all,

I’m using an OpenAI function and facing an issue where the configuration field is not being returned in the function output . However, when I use an empty schema, the configuration (or any other input) is always returned, even with strict: false. I’m trying to understand the discrepancy here and how I can ensure that configuration is always returned, when I use the explicit complete schema

Here’s the function definition where the configuration is not returned:

{
  "name": "Data_Flow_API-createDataflow",
  "description": "I'm an AI from Data Flow API. Instruct what you want, and I'll assist via an API with description: Returns the created instance",
  "strict": false,
  "parameters": {
    "properties": {
      "name": {
        "description": "The name of the data flow",
        "type": "string"
      },
      "description": {
        "description": "A description of the data flow",
        "type": "string"
      },
      "status": {
        "description": "The status of the data flow",
        "type": "string"
      },
      "configuration": {
        "description": "Configuration details of the data flow",
        "type": "object",
        "default": {}
      }
    },
    "required": [
      "name",
      "description",
      "status",
      "configuration"
    ],
    "type": "object"
  }
}

However, when I use an empty schema like this one, the input is always returned in the function output including configuration

{
  "name": "Data_Flow_API-createDataflow",
  "description": "I'm an AI from Data Flow API. Instruct what you want, and I'll assist via an API with description: Returns the created instance",
  "strict": false,
  "parameters": {
    "type": "object",
    "properties": {
      "input": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "object"
          },
          {
            "type": "array",
            "items": {}
          },
          {}
        ]
      }
    },
    "required": [
      "input"
    ]
  }
}