Skip to main content
The framework provides comprehensive error handling for all LLM operations.

ModelHTTPError

HTTP errors during model requests:

UserError

Configuration or usage errors:

UnexpectedModelBehavior

Unexpected model responses:

Rate Limit Handling

Rate limit handling with exponential backoff retry:

Token Limit Handling

Context length exceeded handling:

Invalid Response Handling

Structured output validation:

Global Error Handling

Disable model requests for testing: