Structured Output is randomly renaming schema field names. The names returned are usually synonyms of the requested field name.
I’m having to add so much sanitization (over 200 lines) to the returned object to normalise the schema back to match the output and it’s infuriating. I’ve even tried adding to the prompt instructions such as “The response MUST match the provided schema.” but this is largely ignored.
One example:
schema requested is “score_awarded”
gemini returns “mark” or “mark_awarded” or “score” or “grade”