fix(ci): 质量检查 - 同步格式、前端断言与存储降级

This commit is contained in:
cn-derekdu
2026-09-19 06:49:19 +00:00
committed by ddCat
parent 8b68c6ef12
commit 5f73916e17
12 changed files with 57 additions and 46 deletions

View File

@@ -77,8 +77,8 @@ func TestRenamedUpstreamKeyReachesSystemChannelRequests(t *testing.T) {
ModelKey: "deepseek-v4-flash", ProviderModelKey: "deepseek-v4-flash", DisplayName: "deepseek-v4-flash",
Capability: "text", Protocol: string(model.ChannelInterfaceChatCompletion),
CapabilityConfig: DefaultModelCapabilityConfigForModel(string(model.ChannelInterfaceChatCompletion), "deepseek-v4-flash"),
PriceTiers: []ChannelModelPriceTierRequest{{ProviderModelKey: "deepseek-v4-flash", BillingMode: "fixed_request", PriceConfigured: true, Enabled: &enabled}},
Enabled: &enabled,
PriceTiers: []ChannelModelPriceTierRequest{{ProviderModelKey: "deepseek-v4-flash", BillingMode: "fixed_request", PriceConfigured: true, Enabled: &enabled}},
Enabled: &enabled,
})
if err != nil {
t.Fatalf("initial save failed: %v", err)
@@ -87,8 +87,8 @@ func TestRenamedUpstreamKeyReachesSystemChannelRequests(t *testing.T) {
ModelKey: "deepseek-v4.1-flash", ProviderModelKey: "deepseek-v4.1-flash", DisplayName: "deepseek-v4.1-flash",
Capability: "text", Protocol: string(model.ChannelInterfaceChatCompletion),
CapabilityConfig: DefaultModelCapabilityConfigForModel(string(model.ChannelInterfaceChatCompletion), "deepseek-v4.1-flash"),
PriceTiers: []ChannelModelPriceTierRequest{{ProviderModelKey: "deepseek-v4-flash", BillingMode: "fixed_request", PriceConfigured: true, Enabled: &enabled}},
Enabled: &enabled,
PriceTiers: []ChannelModelPriceTierRequest{{ProviderModelKey: "deepseek-v4-flash", BillingMode: "fixed_request", PriceConfigured: true, Enabled: &enabled}},
Enabled: &enabled,
}); err != nil {
t.Fatalf("rename save failed: %v", err)
}

View File

@@ -58,31 +58,31 @@ const (
ChannelScopeSystem ChannelScope = "system"
ChannelScopeUser ChannelScope = "user"
ChannelInterfaceChatCompletion ChannelInterfaceType = "chat-completion"
ChannelInterfaceOpenAIResponse ChannelInterfaceType = "openai-response"
ChannelInterfaceClaudeAPI ChannelInterfaceType = "claude-api"
ChannelInterfaceOpenAIImage ChannelInterfaceType = "openai-image"
ChannelInterfaceGrokImage ChannelInterfaceType = "grok-image"
ChannelInterfaceVolcengineArkImage ChannelInterfaceType = "volcengine-ark-image"
ChannelInterfaceVolcengineArkAgentPlanImage ChannelInterfaceType = "volcengine-ark-agent-plan-image"
ChannelInterfaceVolcengineJiMengImage ChannelInterfaceType = "volcengine-jimeng-image"
ChannelInterfaceGeminiImage ChannelInterfaceType = "gemini-image"
ChannelInterfaceOpenAIAudio ChannelInterfaceType = "openai-audio"
ChannelInterfaceAsyncAudio ChannelInterfaceType = "async-audio"
ChannelInterfaceNewAPIVideo ChannelInterfaceType = "newapi"
ChannelInterfaceNewAPIChannel1 ChannelInterfaceType = "newapi-channel-1"
ChannelInterfaceNewAPIChannel2 ChannelInterfaceType = "newapi-channel-2"
ChannelInterfaceXAIVideo ChannelInterfaceType = "xai-video"
ChannelInterfaceVolcengineArkVideo ChannelInterfaceType = "volcengine-ark-video"
ChannelInterfaceVolcengineArkAgentPlanVideo ChannelInterfaceType = "volcengine-ark-agent-plan-video"
ChannelInterfaceVolcengineJiMengVideo ChannelInterfaceType = "volcengine-jimeng-video"
ChannelInterfaceGeminiVeo ChannelInterfaceType = "gemini-veo"
ChannelInterfaceNovitaVideo ChannelInterfaceType = "novita-video"
ChannelInterfaceMiniMaxVideo ChannelInterfaceType = "minimax-video"
ChannelInterfaceAgnesVideo ChannelInterfaceType = "agnes-video"
ChannelInterfaceRunningHubImage ChannelInterfaceType = "runninghub-workflow-image"
ChannelInterfaceRunningHubVideo ChannelInterfaceType = "runninghub-workflow-video"
ChannelInterfaceRunningHubAudio ChannelInterfaceType = "runninghub-workflow-audio"
ChannelInterfaceChatCompletion ChannelInterfaceType = "chat-completion"
ChannelInterfaceOpenAIResponse ChannelInterfaceType = "openai-response"
ChannelInterfaceClaudeAPI ChannelInterfaceType = "claude-api"
ChannelInterfaceOpenAIImage ChannelInterfaceType = "openai-image"
ChannelInterfaceGrokImage ChannelInterfaceType = "grok-image"
ChannelInterfaceVolcengineArkImage ChannelInterfaceType = "volcengine-ark-image"
ChannelInterfaceVolcengineArkAgentPlanImage ChannelInterfaceType = "volcengine-ark-agent-plan-image"
ChannelInterfaceVolcengineJiMengImage ChannelInterfaceType = "volcengine-jimeng-image"
ChannelInterfaceGeminiImage ChannelInterfaceType = "gemini-image"
ChannelInterfaceOpenAIAudio ChannelInterfaceType = "openai-audio"
ChannelInterfaceAsyncAudio ChannelInterfaceType = "async-audio"
ChannelInterfaceNewAPIVideo ChannelInterfaceType = "newapi"
ChannelInterfaceNewAPIChannel1 ChannelInterfaceType = "newapi-channel-1"
ChannelInterfaceNewAPIChannel2 ChannelInterfaceType = "newapi-channel-2"
ChannelInterfaceXAIVideo ChannelInterfaceType = "xai-video"
ChannelInterfaceVolcengineArkVideo ChannelInterfaceType = "volcengine-ark-video"
ChannelInterfaceVolcengineArkAgentPlanVideo ChannelInterfaceType = "volcengine-ark-agent-plan-video"
ChannelInterfaceVolcengineJiMengVideo ChannelInterfaceType = "volcengine-jimeng-video"
ChannelInterfaceGeminiVeo ChannelInterfaceType = "gemini-veo"
ChannelInterfaceNovitaVideo ChannelInterfaceType = "novita-video"
ChannelInterfaceMiniMaxVideo ChannelInterfaceType = "minimax-video"
ChannelInterfaceAgnesVideo ChannelInterfaceType = "agnes-video"
ChannelInterfaceRunningHubImage ChannelInterfaceType = "runninghub-workflow-image"
ChannelInterfaceRunningHubVideo ChannelInterfaceType = "runninghub-workflow-video"
ChannelInterfaceRunningHubAudio ChannelInterfaceType = "runninghub-workflow-audio"
ApiCallStatusSucceeded ApiCallStatus = "succeeded"
ApiCallStatusFailed ApiCallStatus = "failed"

View File

@@ -22,7 +22,7 @@ func TestImageToolsProvidersBuildAsyncImageRequests(t *testing.T) {
t.Fatal("image tools must receive hydrated public image URLs")
}
created, err := adapter.BuildCreate(context.Background(), RequestContext{Request: GenerationRequest{
Model: tc.model,
Model: tc.model,
Prompt: "preserve the source image while applying the requested image operation",
Images: []MediaReference{{URL: "https://cdn.example/source.png", Role: "edit_source", Order: 0}},
}})