Starting this morning, the Chat Completion API has begun returning malformed or inconsistent JSON.
I am using gpt-4o-2024-11-20 with JSON-style responses. My prompts have not changed, but the model is now intermittently returning JSON objects with:
-
Missing dictionary keys
-
Keys placed at the wrong level
-
Keys spelled differently between requests
-
A different structure from the one it was reliably producing until now
The specific issue varies by request. And sometimes the response is just fine.
Expected output format (what has always been returned):
{
"object": {
"key1": "REDACTED",
"key2": "REDACTED",
"key3": "REDACTED"
}
}
Example of the malformed output (starting today):
{
"key2": "REDACTED",
"object": {
"key1": "REDACTED"
},
"key3": "REDACTED"
}
In other cases, the keys are spelled differently or appear in unexpected positions.
Has something recently changed on the model or API side that could cause previously consistent JSON structures to become unstable? And is there a known workaround or path to resolution? Anyone else experiencing this issue?
This is a production workflow that has been stable for a long time (almost a year!), so any guidance would be appreciated.
THANK YOU!