mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
feat: add Baidu Qianfan provider and update provider list (#188)
This commit is contained in:
parent
dc4bf69854
commit
ab694a38ed
2 changed files with 16 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue