Restore standard MiniMax resolutions and client mapping
This commit is contained in:
@@ -46,7 +46,7 @@ func TestVideoBillingEstimateUsesFiveSecondUnitsAndDynamicWeights(t *testing.T)
|
||||
"video": map[string]any{
|
||||
"basePrice": 100,
|
||||
"dynamicWeight": map[string]any{
|
||||
"resolutionWeights": map[string]any{"1080p": 1.5},
|
||||
"resolutionWeights": map[string]any{"720p": 1.25, "1080p": 1.5},
|
||||
"audioWeights": map[string]any{"true": 2},
|
||||
"referenceVideoWeights": map[string]any{"true": 1.5},
|
||||
"voiceSpecifiedWeights": map[string]any{"true": 1.2},
|
||||
@@ -59,7 +59,7 @@ func TestVideoBillingEstimateUsesFiveSecondUnitsAndDynamicWeights(t *testing.T)
|
||||
items := service.billings(context.Background(), nil, "videos.generations", map[string]any{
|
||||
"audio": true,
|
||||
"duration": 12,
|
||||
"resolution": "1080p",
|
||||
"resolution": "1080P",
|
||||
"voice_id": "voice-a",
|
||||
"content": []any{
|
||||
map[string]any{"type": "video_url", "video_url": map[string]any{"url": "https://example.com/reference.mp4"}},
|
||||
@@ -82,6 +82,15 @@ func TestVideoBillingEstimateUsesFiveSecondUnitsAndDynamicWeights(t *testing.T)
|
||||
if got, want := line["audioSource"], "preprocessed_request"; got != want {
|
||||
t.Fatalf("video audio source = %v, want %v", got, want)
|
||||
}
|
||||
|
||||
items = service.billings(context.Background(), nil, "videos.generations", map[string]any{
|
||||
"duration": 5,
|
||||
"resolution": "768P",
|
||||
}, candidate, clients.Response{}, true)
|
||||
line = firstBillingLine(t, items)
|
||||
if got, want := floatFromAny(line["amount"]), 125.0; got != want {
|
||||
t.Fatalf("768P should use 720p billing weight, got %v, want %v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMusicBillingUsesSongResourceAndOutputCount(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user