fix(billing): 前台模型 - 支持火山方舟视频 Token 计费

This commit is contained in:
MasterChiefCN committed 2026-08-21 11:57:36 +08:00
1 parent 4dfc92817c
commit 851bec843f
6 files changed
+98 -18

No files matched your search

@@ -150,6 +150,21 @@ func TestLogicalModelAvailabilityErrorRequiresSettlementReadyCoverage(t *testing
}
}
func TestSupportsLogicalModelTokenBillingForArkVideoRoutes(t *testing.T) {
if !supportsLogicalModelTokenBilling("text", nil) {
t.Fatal("text logical models should support Token billing")
}
if !supportsLogicalModelTokenBilling("video", []model.ChannelInterfaceType{model.ChannelInterfaceVolcengineArkVideo}) {
t.Fatal("Ark video-only routes should support Token billing")
}
if supportsLogicalModelTokenBilling("video", nil) {
t.Fatal("video logical models without an enabled route must not support Token billing")
}
if supportsLogicalModelTokenBilling("video", []model.ChannelInterfaceType{model.ChannelInterfaceVolcengineArkVideo, model.ChannelInterfaceNewAPIVideo}) {
t.Fatal("mixed video protocols must not support Token billing")
}
}
func TestChannelModelCapabilitySpecRequiresExplicitImageCapability(t *testing.T) {
channelModel := model.ChannelModel{Capability: "image", CapabilityConfigJSON: ""}