AIErrorType: "RateLimit" | "NoCredit" | "Authentication" | "ServiceUnavailable" | "InternalServerError" | "NetworkError" | "InvalidRequest" | "VendorValidationError" | "ContextLengthExceeded" | "ModelError" | "Unknown"

Categorizes error types that can occur during AI model operations. These categories help determine appropriate retry and failover strategies.

Description

  • RateLimit: Rate limit exceeded - typically HTTP 429. Suggests switching to another provider or waiting
  • NoCredit: Insufficient credits or quota for billing - typically HTTP 402/403. Account has no credits/balance or quota exhausted. Suggests switching to another provider
  • Authentication: Authentication or authorization failure - typically HTTP 401/403. Usually indicates invalid API key or permissions issue
  • ServiceUnavailable: Service temporarily unavailable - typically HTTP 503. Suggests the service is down or overloaded
  • InternalServerError: Internal server error - typically HTTP 500. Indicates a problem on the provider's side
  • NetworkError: Network connectivity issues. Connection timeouts, DNS failures, etc.
  • InvalidRequest: Invalid request format or parameters - typically HTTP 400. Usually indicates a structural problem with the request (malformed JSON, invalid syntax)
  • VendorValidationError: Vendor-specific schema or field validation error - typically HTTP 400/422. Field requirements, missing properties, schema validation that may be vendor-specific
  • ContextLengthExceeded: Context length exceeded - typically HTTP 400 with context_length_exceeded code. Suggests switching to a model with larger context window
  • ModelError: Model-specific errors. Model not found, model overloaded, etc.
  • Unknown: Unknown or unclassified error

Since

2.47.0