mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
Refactor Gemini, GeminiCLI, GeminiPro, and QwenCode providers to streamline model handling and track live instances
This commit is contained in:
parent
6607c82d3c
commit
9fbff6347c
4 changed files with 11 additions and 29 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue