From 3d3460ce63a77b50a79974718ca8202671677eaa Mon Sep 17 00:00:00 2001 From: easyai Date: Wed, 22 Jul 2026 01:48:10 +0800 Subject: [PATCH] =?UTF-8?q?test(kling):=20=E5=85=BC=E5=AE=B9=E5=85=A8?= =?UTF-8?q?=E6=A8=A1=E6=80=81=E6=A8=A1=E5=9E=8B=E5=B1=95=E7=A4=BA=E5=88=AB?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 集成测试通过现有可灵别名归一规则校验解析模型,兼容共享数据库返回 kling-o1 等目录展示名,同时保留任务成功与推断模型类型断言。 --- apps/api/internal/httpapi/kling_compat_integration_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/internal/httpapi/kling_compat_integration_test.go b/apps/api/internal/httpapi/kling_compat_integration_test.go index 3ca0f2a..5801f37 100644 --- a/apps/api/internal/httpapi/kling_compat_integration_test.go +++ b/apps/api/internal/httpapi/kling_compat_integration_test.go @@ -144,7 +144,8 @@ WHERE platform_id = $1::uuid } `json:"task"` } doJSON(t, server.URL, http.MethodPost, "/api/v1/videos/generations", apiKeyResponse.Secret, request, http.StatusAccepted, &response) - if response.Task.Status != "succeeded" || response.Task.ModelType != expectedModelType || response.Task.ResolvedModel != model { + resolvedModel, resolved := klingV2ProviderModel(response.Task.ResolvedModel) + if response.Task.Status != "succeeded" || response.Task.ModelType != expectedModelType || !resolved || resolvedModel != model { t.Fatalf("generic video request without modelType should use inferred capability: %+v", response.Task) } })