feat(*): 创作平台 - 升级短剧分镜工作流并完善模型计费与界面状态
This commit is contained in:
1 parent
4b75504f75
commit
0558cf4381
33 files changed
+2849
-239
No files matched your search
@@ -72,6 +72,26 @@ func TestResolveTaskModelSelectionAllowsExplicitSystemChannelWhenFrontendModelsE
|
||||
}
|
||||
}
|
||||
|
||||
func TestResolveTaskModelSelectionAllowsCustomImageChannelWhenFrontendModelsEnabled(t *testing.T) {
|
||||
input := map[string]any{
|
||||
"mode": "image",
|
||||
"config": map[string]any{
|
||||
"baseUrl": "https://images.example.com/v1",
|
||||
"apiKey": "custom-key",
|
||||
"interfaceType": "openai-image",
|
||||
"model": "custom-image-model",
|
||||
},
|
||||
}
|
||||
|
||||
routed, resolvedInput, err := (&Service{}).resolveTaskModelSelection(input, "", "canvas_image", "image", true)
|
||||
if err != nil {
|
||||
t.Fatalf("resolveTaskModelSelection() error = %v", err)
|
||||
}
|
||||
if routed != nil || resolvedInput["config"] == nil {
|
||||
t.Fatalf("resolveTaskModelSelection() routed = %#v, input = %#v", routed, resolvedInput)
|
||||
}
|
||||
}
|
||||
|
||||
func TestResolveTaskModelSelectionStillRequiresLogicalModelWithoutExplicitSystemChannel(t *testing.T) {
|
||||
_, _, err := (&Service{}).resolveTaskModelSelection(map[string]any{
|
||||
"mode": "video",
|
||||
|
||||
Reference in new issue
Block a user