Indicates whether this error might be resolved by switching to another provider.
true: Error is provider-specific (rate limit, service down)false: Error is request-specific (bad API key, invalid parameters)AIErrorInfo
Optional contextAdditional context or metadata about the error. Can include provider name, error timestamps, request IDs, etc. This field is flexible to accommodate provider-specific information.
AIErrorInfo
Optional errorOriginal error object thrown by the provider's SDK or API. This allows for deeper inspection if needed.
AIErrorInfo
Categorized error type for standardized error handling. This allows consistent error handling across different AI providers.
AIErrorInfo
Optional httpHTTP status code returned by the provider's API. Common codes include:
AIErrorInfo
Optional providerOriginal error code from the provider's SDK or API. This preserves provider-specific error codes for debugging. Examples: 'rate_limit_exceeded', 'model_not_found', 'invalid_api_key'
AIErrorInfo
Severity level indicating how the error should be handled. Used to determine whether to retry immediately, wait, or fail permanently.
AIErrorInfo
Optional suggestedSuggested delay in seconds before retrying the operation. For rate limits, this often comes from the provider's Retry-After header. If undefined, the caller should use exponential backoff or default delays.
AIErrorInfo
Provides detailed, structured error information for AI operations. This interface enables intelligent error handling, retry logic, and provider failover decisions.
AIErrorInfo
Since
2.47.0
Example