Yes
That works for me reliably
zbrw on Hacker News
In the thread “Use the Gemini API with OpenAI Fallback in TypeScript”, replying to this comment
Helped: Supplying JSON schema and setting response type to application/json.
Got in the way: Max token constraints when processing large lists in one call.
Things to note: 1) supply a JSON schema in `config.reponse_schema` 2) set the `config.response_type` to `application/json` That works for me reliably. I've had some issues with running into max_token constraints but that was usually on me because I had let it process a large list in one inference call, which would have resulted in very large outputs. …