I offer a function that can take the primitives, a schema and the “container metadata”, a parameter whether it is for_chat_completions, and delivers your API call’s “text” for Responses or “response_format” for Chat Completions:
Run the full python script and it even runs the same schema against both endpoints as “proof”.