diff --git a/g4f/gui/server/api.py b/g4f/gui/server/api.py index 2d871ff34b6..29fc34e25ff 100644 --- a/g4f/gui/server/api.py +++ b/g4f/gui/server/api.py @@ -48,7 +48,7 @@ def get_provider_models(provider: str, api_key: str = None) -> list[dict]: "model": model, "default": model == provider.default_model, "vision": getattr(provider, "default_vision_model", None) == model or model in getattr(provider, "vision_models", []), - "image": model in getattr(provider, "image_models", []), + "image": False if provider.image_models is None else model in provider.image_models, } for model in models ]