test(providers): move cloudflare case out of merge-hot table
This commit is contained in:
parent
bf1707366b
commit
0e5cd68d5f
1 changed files with 10 additions and 6 deletions
|
|
@ -70,12 +70,6 @@ func TestExtractProtocol(t *testing.T) {
|
||||||
wantProtocol: "azure",
|
wantProtocol: "azure",
|
||||||
wantModelID: "my-gpt5-deployment",
|
wantModelID: "my-gpt5-deployment",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "cloudflare model id keeps full path",
|
|
||||||
model: "@cf/qwen/qwen1.5-0.5b-chat",
|
|
||||||
wantProtocol: "openai",
|
|
||||||
wantModelID: "@cf/qwen/qwen1.5-0.5b-chat",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|
@ -91,6 +85,16 @@ func TestExtractProtocol(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestExtractProtocol_CloudflareModelID(t *testing.T) {
|
||||||
|
protocol, modelID := ExtractProtocol("@cf/qwen/qwen1.5-0.5b-chat")
|
||||||
|
if protocol != "openai" {
|
||||||
|
t.Fatalf("protocol = %q, want %q", protocol, "openai")
|
||||||
|
}
|
||||||
|
if modelID != "@cf/qwen/qwen1.5-0.5b-chat" {
|
||||||
|
t.Fatalf("modelID = %q, want %q", modelID, "@cf/qwen/qwen1.5-0.5b-chat")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestCreateProviderFromConfig_OpenAI(t *testing.T) {
|
func TestCreateProviderFromConfig_OpenAI(t *testing.T) {
|
||||||
cfg := &config.ModelConfig{
|
cfg := &config.ModelConfig{
|
||||||
ModelName: "test-openai",
|
ModelName: "test-openai",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue