"Could not parse JSON body" error in following Structured Output example

Here’s an answer for you: not the latest versions of support libraries like Pydantic.

You may need to make a venv and follow the install versioning I note here:

Problems - and using bleeding-edige python versions.