feat(gateway): 补齐桌面端高级媒体直连接口
ci / verify (pull_request) Successful in 15m34s

新增图片矢量化、视频超分、每日用量、计价与任务隔离能力,并通过环境变量解析平台凭据。

已通过 Go 全量门禁、迁移检查、镜像构建以及 Vectorizer 五格式和 Topaz 3 秒视频真实 DEV 验收。
This commit is contained in:
2026-07-22 14:02:53 +08:00
parent cbebfd7baa
commit 3056cf8fca
37 changed files with 3336 additions and 29 deletions
@@ -39,6 +39,20 @@ func TestVideoModelTypeInferenceReadsContentArray(t *testing.T) {
}
}
func TestAdvancedMediaModelTypeInference(t *testing.T) {
if got := modelTypeFromKind("images.vectorize", nil); got != "image_vectorize" {
t.Fatalf("images.vectorize model type = %s", got)
}
if got := modelTypeFromKind("videos.upscales", nil); got != "video_enhance" {
t.Fatalf("videos.upscales model type = %s", got)
}
for _, alias := range []string{"vectorize", "image-vectorizer", "image_vectorize"} {
if got := canonicalModelType(alias); got != "image_vectorize" {
t.Fatalf("canonical image vectorize alias %q = %q", alias, got)
}
}
}
func TestVideoContentTextContributesToTokenEstimate(t *testing.T) {
tokens := estimateRequestTokens(map[string]any{
"model": "demo-video",