From 0e5cd68d5f9863d9ba5a91737cd875eb30e3a810 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=BE=99=200668001470?=
Date: Mon, 16 Mar 2026 09:20:47 +0800
Subject: [PATCH] test(providers): move cloudflare case out of merge-hot table
---
pkg/providers/factory_provider_test.go | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
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",