OpenAI SDK Compatibility suddenly stopped working

I had some functions using the OpenAI SDK compatibility with gemini-2.5-pro and it was working fine until lunch time when without no code change, redeployment, or anything at all in terms of code, it stopped working and broke my app. Users started reporting that nothing worked and when I checked the logs I now get:

BadRequestError: 400 status code (no body)
    at APIError.generate (/workspace/node_modules/openai/core/error.js:45:20)
    at OpenAI.makeStatusError (/workspace/node_modules/openai/client.js:163:32)
    at OpenAI.makeRequest (/workspace/node_modules/openai/client.js:331:30)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /workspace/lib/foodProcessing.js:1152:45
    at async /workspace/node_modules/firebase-functions/lib/common/providers/https.js:529:26 {
  status: 400,
  headers: Headers {
    vary: 'Origin, X-Origin, Referer',
    'content-type': 'application/json; charset=UTF-8',
    'content-encoding': 'gzip',
    date: 'Sat, 13 Sep 2025 16:34:02 GMT',
    server: 'scaffolding on HTTPServer2',
    'x-xss-protection': '0',
    'x-frame-options': 'SAMEORIGIN',
    'x-content-type-options': 'nosniff',
    'server-timing': 'gfet4t7; dur=55',
    'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
    'transfer-encoding': 'chunked'
  },
  requestID: null,
  error: undefined,
  code: undefined,
  param: undefined,
  type: undefined
}

Is anyone else experiencing this? I know my code is fine because it has worked for the past 6 months or so and now suddenly stopped. We weren’t even working today.

Same thing happened to me about 9 hours ago. For me the issue was related to structured output support changing. Since the error gave no hints what the problem was, I ulimately ended up switching to Gemini’s Node.js SDK where there are no issuues.

Same. No hint, but through testing I realised it was structured output support changing too, which is outrageous. Instead of improving support, they limited it. I knew I had to either switch to the Google SDK (probably their goal) or switch to OpenAI, which is what I did out of spite.

Hi all, I am also experiencing this behavior BadRequestError: 400 status code (no body) since 9/13. My issue also related to structure output.

Here is the response_format that was working but no longer work:

{
        type: 'json_schema',
        json_schema: {
          name: 'object_detection',
          schema: {
            type: 'object',
            required: ['bounding_boxes'],
            properties: {
              bounding_boxes: {
                type: 'array',
                items: {
                  type: 'object',
                  required: ['boxes'],
                  properties: {
                    boxes: {
                      type: 'array',
                      items: {
                        type: 'object',
                        required: ['coordinate', 'label'],
                        properties: {
                          label: {
                            type: 'string',
                            description: 'Label for this detection',
                          },
                          coordinate: {
                            type: 'array',
                            maxItems: 4,
                            minItems: 4,
                            description: 'Bounding box coordinates [y_min, x_min, y_max, x_max]',
                            items: {
                              type: 'number',
                            },
                          },
                        },
                        description: 'List of detected boxes for this image',
                        additionalProperties: false,
                      },
                    },
                  },
                  description: 'Detections for a single image',
                  additionalProperties: false,
                },
                description: 'One entry per input image, each an array of detections',
              },
            },
            additionalProperties: false,
          },
          strict: true,
        },
      }

I did some random testing and somehow if I remove items: {type: 'number'} from coordinate, then it will work again.

Also, if I remove everything and set bounding_boxes to:

{
                type: 'array',
                maxItems: 4,
                minItems: 4,
                description: 'Bounding box coordinates [y_min, x_min, y_max, x_max]',
                items: {
                  type: 'number',
                },
              }

This will also go thru and no error.

So I guess it can’t handle too many nested array? I am not sure.

I have not test with the native google gemini sdk yet.