A1 · Building With Model APIs
Structured Outputs
Validate model output against a schema and recover when it does not match.
Your code wants a field. The model wants to be helpful. So it writes "Sure! Here you go:" and your parser falls over on the first character.