summaryrefslogtreecommitdiffstats
path: root/g4f/providers/base_provider.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/providers/base_provider.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/g4f/providers/base_provider.py b/g4f/providers/base_provider.py
index cb60d78f..685a6f98 100644
--- a/g4f/providers/base_provider.py
+++ b/g4f/providers/base_provider.py
@@ -269,16 +269,18 @@ class AsyncGeneratorProvider(AsyncProvider):
AsyncResult: An asynchronous generator yielding results.
"""
raise NotImplementedError()
-
+
class ProviderModelMixin:
default_model: str
models: list[str] = []
model_aliases: dict[str, str] = {}
-
+
@classmethod
def get_models(cls) -> list[str]:
+ if not cls.models:
+ return [cls.default_model]
return cls.models
-
+
@classmethod
def get_model(cls, model: str) -> str:
if not model and cls.default_model is not None: