|
|
|
|
|
by atas2390
102 days ago
|
|
This looks very cool, thanks for sharing. One thing I’m trying to reason about with tools like this: how does SafeParse fit with provider‑side structured outputs (OpenAI’s structured output / tool calls, Anthropic tool use, etc.)? Do you still run your own schema validation + retry loop on top of those APIs, or do you assume model‑enforced schemas and mostly focus on tracing / retries for transport errors and rate limits? Curious where you see the boundary between “let the model guarantee the schema” vs “treat the model as an untrusted JSON generator and validate/retry on our side.” |
|
Those APIs definitely help, but in practice I still run into things like required fields coming back empty, weird edge cases that technically pass the schema, or just timeouts / rate limits breaking the pipeline.
So SafeParse still validates the response again and retries if something looks wrong. It can also fall back to another model if the provider is having issues.
I mostly think of provider-side structured outputs as improving the baseline, and SafeParse handling the messy operational stuff once these pipelines run continuously in production.