feat: add Baidu Qianfan provider and update provider list (#188)

This commit is contained in:
zephyrq-z 2026-06-23 15:22:12 +08:00 committed by GitHub
parent dc4bf69854
commit ab694a38ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View file

@ -173,6 +173,21 @@ var registry = []Provider{
"MiniMax-M2.5-highspeed",
},
},
{
Name: "baidu-qianfan",
DisplayName: "Baidu Qianfan API",
Protocol: "openai",
BaseURL: "https://qianfan.baidubce.com/v2",
EnvVar: "QIANFAN_API_KEY",
Models: []string{
"ernie-5.1",
"ernie-5.0",
"ernie-x1.1",
"ernie-x1-turbo-32k-preview",
"deepseek-v4-pro",
"deepseek-v4-flash",
},
},
}
var registryMap map[string]Provider

View file

@ -40,7 +40,7 @@ func TestListProviders_Order(t *testing.T) {
if len(providers) < 3 {
t.Fatalf("expected at least 3 providers, got %d", len(providers))
}
expected := []string{"anthropic", "dashscope", "dashscope-tokenplan", "deepseek", "hy-tokenplan", "kimi", "mimo", "minimax", "openai", "tencent-tokenhub", "volcengine", "z-ai"}
expected := []string{"anthropic", "baidu-qianfan", "dashscope", "dashscope-tokenplan", "deepseek", "hy-tokenplan", "kimi", "mimo", "minimax", "openai", "tencent-tokenhub", "volcengine", "z-ai"}
if len(providers) != len(expected) {
t.Fatalf("expected %d providers, got %d", len(expected), len(providers))
}