mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-09-26 20:31:14 +08:00
Add model alias for Kimi-K2-Instruct and update best_provider references
This commit is contained in:
@@ -77,6 +77,8 @@ class DeepInfra(OpenaiTemplate):
|
||||
"qwen-3-32b": "Qwen/Qwen3-32B",
|
||||
"qwen-3-235b": "Qwen/Qwen3-235B-A22B",
|
||||
"qwq-32b": "Qwen/QwQ-32B",
|
||||
|
||||
"moonshotai/Kimi-K2-Instruct": "moonshotai/Kimi-K2-Instruct-0905",
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
@@ -88,6 +88,7 @@ class PollinationsAI(AsyncGeneratorProvider, ProviderModelMixin):
|
||||
vision_models = [default_vision_model]
|
||||
_models_loaded = False
|
||||
model_aliases = {
|
||||
"openai-fast": "gpt-4.1-nano",
|
||||
"llama-4-scout": "llamascout",
|
||||
"deepseek-r1": "deepseek-reasoning",
|
||||
"sdxl-turbo": "turbo",
|
||||
@@ -105,6 +106,8 @@ class PollinationsAI(AsyncGeneratorProvider, ProviderModelMixin):
|
||||
alias = model.get("name")
|
||||
if (model.get("aliases")):
|
||||
alias = model.get("aliases")[0]
|
||||
elif alias in cls.model_aliases:
|
||||
alias = cls.model_aliases[alias]
|
||||
return alias.replace("-instruct", "").replace("qwen-", "qwen").replace("qwen", "qwen-")
|
||||
if not cls._models_loaded:
|
||||
try:
|
||||
|
@@ -32,6 +32,7 @@ model_aliases = {
|
||||
"llama-3.2-11b": "meta-llama/Llama-3.2-11B-Vision-Instruct",
|
||||
"mistral-nemo": "mistralai/Mistral-Nemo-Instruct-2407",
|
||||
"phi-3.5-mini": "microsoft/Phi-3.5-mini-instruct",
|
||||
"moonshotai/Kimi-K2-Instruct": "moonshotai/Kimi-K2-Instruct-0905",
|
||||
### Used in other providers ###
|
||||
"qwen-2-vl-7b": "Qwen/Qwen2-VL-7B-Instruct",
|
||||
"gemma-2-27b": "google/gemma-2-27b-it",
|
||||
|
@@ -271,7 +271,7 @@ o4_mini_high = Model(
|
||||
gpt_4_1 = Model(
|
||||
name = 'gpt-4.1',
|
||||
base_provider = 'OpenAI',
|
||||
best_provider = IterListProvider([PollinationsAI, OpenaiChat])
|
||||
best_provider = IterListProvider([OpenaiChat])
|
||||
)
|
||||
|
||||
gpt_4_1_mini = Model(
|
||||
@@ -283,7 +283,7 @@ gpt_4_1_mini = Model(
|
||||
gpt_4_1_nano = Model(
|
||||
name = 'gpt-4.1-nano',
|
||||
base_provider = 'OpenAI',
|
||||
best_provider = IterListProvider([Blackbox])
|
||||
best_provider = IterListProvider([Blackbox, PollinationsAI])
|
||||
)
|
||||
|
||||
gpt_4_5 = Model(
|
||||
|
Reference in New Issue
Block a user