diff --git a/src/distilabel/llm/openai.py b/src/distilabel/llm/openai.py index 6fdf17f8fc..43757cd329 100644 --- a/src/distilabel/llm/openai.py +++ b/src/distilabel/llm/openai.py @@ -117,9 +117,12 @@ def __init__( self.client = client or OpenAI(api_key=api_key, max_retries=6) - assert ( - model in self.available_models - ), f"Provided `model` is not available in your OpenAI account, available models are {self.available_models}" + try: + assert ( + model in self.available_models + ), f"Provided `model` is not available in your OpenAI account, available models are {self.available_models}" + except AttributeError: + logger.warning("Unable to check if model is available in your account.") self.model = model def __rich_repr__(self) -> Generator[Any, None, None]: