From 2c3487a2f824fa068c3f9c10f374dbf2e4119737 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 27 Apr 2026 10:55:08 +0900 Subject: [PATCH] feat(minimax): add per_call_cost for video and music models (#79) Video and music modality models are billed per generation rather than per token. Without this field the librefang runtime metering layer records every call as $0 and emits a warning. Sourced from https://platform.minimax.io/docs/guides/pricing-paygo. - Hailuo 2.3 Fast: $0.33 per call (1080P/6s upper bound) - Hailuo 2.3: $0.56 per call (1080P/6s upper bound) - Hailuo 02: $0.56 per call (1080P/6s upper bound) - Music 2.6: $0.15 per up-to-5-minute track - Lyrics gen: $0.01 per song Also adds per_call_cost to schema.toml so the field is documented alongside the other cost fields. --- providers/minimax.toml | 5 +++++ schema.toml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/providers/minimax.toml b/providers/minimax.toml index 48b533e..ae5f554 100644 --- a/providers/minimax.toml +++ b/providers/minimax.toml @@ -155,6 +155,7 @@ tier = "fast" modality = "video" input_cost_per_m = 0.0 output_cost_per_m = 0.0 +per_call_cost = 0.33 supports_tools = false supports_vision = false supports_streaming = false @@ -168,6 +169,7 @@ tier = "frontier" modality = "video" input_cost_per_m = 0.0 output_cost_per_m = 0.0 +per_call_cost = 0.56 supports_tools = false supports_vision = false supports_streaming = false @@ -181,6 +183,7 @@ tier = "smart" modality = "video" input_cost_per_m = 0.0 output_cost_per_m = 0.0 +per_call_cost = 0.56 supports_tools = false supports_vision = false supports_streaming = false @@ -196,6 +199,7 @@ tier = "frontier" modality = "music" input_cost_per_m = 0.0 output_cost_per_m = 0.0 +per_call_cost = 0.15 supports_tools = false supports_vision = false supports_streaming = false @@ -209,6 +213,7 @@ tier = "fast" modality = "music" input_cost_per_m = 0.0 output_cost_per_m = 0.0 +per_call_cost = 0.01 supports_tools = false supports_vision = false supports_streaming = false diff --git a/schema.toml b/schema.toml index 6fc7b31..14199fd 100644 --- a/schema.toml +++ b/schema.toml @@ -116,6 +116,12 @@ required = false description = "USD per million image output tokens (for image-generation models)" example = 30.0 +[provider.sections.models.fields.per_call_cost] +type = "number" +required = false +description = "Flat USD cost per generation, for models billed per call rather than per token. Strongly recommended for modality='video' and modality='music' (which have no per-token pricing); may also be used for image/audio models that quote a flat per-image or per-request rate. When absent for a per-call modality, the runtime metering layer records the call as $0 and logs a warning." +example = 0.33 + [provider.sections.models.fields.last_verified] type = "string" required = false