diff --git a/pkg/providers/factory_provider_test.go b/pkg/providers/factory_provider_test.go index 57b3b48aa..1cce0a9e8 100644 --- a/pkg/providers/factory_provider_test.go +++ b/pkg/providers/factory_provider_test.go @@ -70,12 +70,6 @@ func TestExtractProtocol(t *testing.T) { wantProtocol: "azure", 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 { @@ -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) { cfg := &config.ModelConfig{ ModelName: "test-openai",