功能增加

This commit is contained in:
andy committed 2026-09-11 15:33:18 +08:00
1 parent b340fc7ad7
commit f1993eb388
69 files changed
+2243 -162

No files matched your search

+17
View File
@@ -115,6 +115,23 @@ func TestServiceQuoteUsesSeedance25CatalogAndTokenEstimate(t *testing.T) {
}
}
func TestServiceQuoteReservesMinimaxH3OfficialRateWithMarkup(t *testing.T) {
store := &quoteStoreStub{rules: []PriceRule{{
ID: "minimax-h3-2k", Provider: "minimax", Capability: "video.generate", ReqKey: MinimaxH3Model,
VariantKey: "resolution=2k", Unit: UnitVideoSecond, StandardUnitPriceFen: 80, MarkupMultiplier: 1.2, Enabled: true,
}}}
quote, err := NewService(store, nil).Quote(context.Background(), QuoteCommand{
Provider: "minimax", Capability: "video.generate", ReqKey: MinimaxH3Model,
Payload: map[string]any{"settings": map[string]any{"duration": 5.0, "resolution": "2K", "ratio": "16:9"}},
})
if err != nil {
t.Fatal(err)
}
if quote.AmountFen != 480 || quote.ReservedAmountFen != 480 || quote.SettlementStatus != "pending" || quote.Parameters["resolution"] != "2k" {
t.Fatalf("quote=%#v", quote)
}
}
func TestServiceQuoteAppliesSeedreamSizeAndReferenceInputPricing(t *testing.T) {
store := &quoteStoreStub{rules: []PriceRule{{
ID: "seedream-5", Provider: "seedream", Capability: "image.generate", ReqKey: Seedream50ProModel,