Refactor Gemini, GeminiCLI, GeminiPro, and QwenCode providers to streamline model handling and track live instances

This commit is contained in:
hlohaus 2025-09-06 12:32:13 +02:00
parent 6607c82d3c
commit 9fbff6347c
4 changed files with 11 additions and 29 deletions

View file

@ -15,12 +15,11 @@ class QwenCode(OpenaiTemplate):
needs_auth = True
active_by_default = True
default_model = "qwen3-coder-plus"
models = [default_model]
client = QwenContentGenerator(QwenOAuth2Client())
@classmethod
def get_models(cls, **kwargs):
if not cls.models:
cls.models = [cls.default_model]
if cls.live == 0 and cls.client.shared_manager.isTokenValid(cls.client.shared_manager.getCurrentCredentials()):
cls.live += 1
return cls.models