https://github.com/dzhng/zod-gpt
And by better I mean doesn't tie you to OpenAI for no good reason
https://github.com/microsoft/TypeChat/blob/4d34a5005c67bc494...
I'm sure someone will open a PR for Anthropic/Cohere/etc. but a quick glance made it pretty clear they made it with OpenAI-first in mind, or even low hanging fruit like retries would have been abstracted away at a higher level.
Open source solutions are great (which this still is, btw), but having a first-party solution is also a good thing.
I've been through this whole song and dance already with Microsoft's Guidance (another LLM project) and could not justify using it further in production at work. We built some tools and wrappers ourselves and it wasn't even that difficult. These libraries are often more trouble than they're worth.
Should lend some credibility to the project.
At the end of the day the repo I linked is grokkable with about 10 minutes of effort, and has simple demonstrable usefulness by letting you swap out the LLM you're calling.
Both are experimental open source libraries in an experimental space.