Skip to main content

Module errors

Module errors 

Source
Expand description

OpenAI provider error handling and formatting utilities.

This module contains error detection, formatting, and recovery logic for OpenAI API interactions.

Functionsยง

fallback_model_if_not_found
Provide a fallback model when the requested model is unavailable.
format_openai_error
Format an OpenAI API error with request metadata.
is_flex_service_tier_unsupported
Detect if an OpenAI API error indicates service_tier=flex is unsupported.
is_model_not_found
Detect if an OpenAI API error indicates the model was not found or is inaccessible.
is_responses_api_unsupported
Detect if an error indicates Responses API is not supported for this model/endpoint.