You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: StructuredOutput validation framework with auto-retry #696
Build a unified structured output framework that validates LLM-generated JSON against Pydantic schemas and intelligently retries on validation failures.
Problem
LLM function calling/tool use is unreliable. Generated JSON may not match expected schema, requiring manual validation and retry logic in every project.
Solution
StructuredOutput class that wraps any LLM provider
Pydantic v2 schema validation with automatic retries
Corrective prompts on validation failure (tell LLM what went wrong)
Unified function calling across all providers (OpenAI, Anthropic, Mistral, etc.)
Cost tracking per attempt (failures count toward budget)
Activity