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.

1 Like