diff --git a/backend/apps/openai/main.py b/backend/apps/openai/main.py index b012f237f..d03748a2c 100644 --- a/backend/apps/openai/main.py +++ b/backend/apps/openai/main.py @@ -197,7 +197,9 @@ async def get_all_models(): "data": merge_models_lists( list( map( - lambda response: response["data"] if response else None, + lambda response: ( + response["data"] if "data" in response else None + ), responses, ) )