From 5a9fba8fa39e4be9035a5189a6c2f5a54df25ee5 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Date: Thu, 25 Jun 2026 23:45:15 -0300 Subject: [PATCH] feat(api): add MiniMax-M3 pricing row (#4814) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Integrated into release/v3.8.37 — pricing row re-homed onto god-file-split pricing/regional.ts (pricing.ts is now a barrel); 4/4 green. --- CHANGELOG.md | 2 ++ src/shared/constants/pricing/regional.ts | 16 ++++++++++++++++ tests/unit/t12-pricing-updates.test.ts | 15 +++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6d7325e53..8f70673512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ _In development — bullets added per PR; finalized at release._ ### 🔧 Bug Fixes +- **pricing**: add the `MiniMax-M3` cost row (canonical + lowercase alias) so the new MiniMax default model gets accurate per-request cost accounting instead of falling back to a zero/default rate (thanks @octo-patch). + - **fix(sse):** Kiro tool-schema sanitizer — strip unsupported JSON-Schema keywords (`anyOf`/`$ref`/`if`-`then`, etc.) and hash-truncate tool names >64 chars before dispatch, mapping the streamed tool-call name back for the client, so Kiro no longer rejects tool calls with `400 "Improperly formed request"`. (thanks @smarthomeblack) - **sse**: make the `anthropic-version` default-guard case-insensitive for `anthropic-compatible-*` providers, so a caller/operator-supplied `Anthropic-Version` (any casing) is no longer clobbered by a second lowercase `anthropic-version: 2023-06-01` header. (thanks @zakirkun) diff --git a/src/shared/constants/pricing/regional.ts b/src/shared/constants/pricing/regional.ts index 739ec566fe..7f5886ab7d 100644 --- a/src/shared/constants/pricing/regional.ts +++ b/src/shared/constants/pricing/regional.ts @@ -71,6 +71,22 @@ export const DEFAULT_PRICING_REGIONAL = { "kimi-latest": { input: 1.0, output: 4.0, cached: 0.5, reasoning: 6.0, cache_creation: 1.0 }, }, minimax: { + // MiniMax M3 — new default model (upstream upgrade from M2.7). + // Same api.minimax.io endpoint; pricing mirrors the M2.x base tier. + "minimax-m3": { + input: 0.5, + output: 2.0, + cached: 0.25, + reasoning: 3.0, + cache_creation: 0.5, + }, + "MiniMax-M3": { + input: 0.5, + output: 2.0, + cached: 0.25, + reasoning: 3.0, + cache_creation: 0.5, + }, "minimax-m2.1": { input: 0.5, output: 2.0, diff --git a/tests/unit/t12-pricing-updates.test.ts b/tests/unit/t12-pricing-updates.test.ts index 76594eef48..d8d5aca520 100644 --- a/tests/unit/t12-pricing-updates.test.ts +++ b/tests/unit/t12-pricing-updates.test.ts @@ -42,6 +42,21 @@ test("T12: codex catalog includes GPT 5.5 variations", () => { assert.equal(codexModels.get("gpt-5.5-xhigh")?.targetFormat, "openai-responses"); }); +test("T12: pricing table includes MiniMax-M3 (canonical + lowercase alias)", () => { + const pricing = getDefaultPricing(); + + assert.ok(pricing.minimax["MiniMax-M3"], "missing minimax/MiniMax-M3"); + assert.ok(pricing.minimax["minimax-m3"], "missing minimax/minimax-m3 alias"); + + for (const key of ["MiniMax-M3", "minimax-m3"]) { + assert.equal(pricing.minimax[key].input, 0.5, `${key} input`); + assert.equal(pricing.minimax[key].output, 2.0, `${key} output`); + assert.equal(pricing.minimax[key].cached, 0.25, `${key} cached`); + assert.equal(pricing.minimax[key].reasoning, 3.0, `${key} reasoning`); + assert.equal(pricing.minimax[key].cache_creation, 0.5, `${key} cache_creation`); + } +}); + test("T12: minimax default model list starts with M3", () => { const minimaxModels = REGISTRY.minimax.models.map((m) => m.id); const minimaxCnModels = REGISTRY["minimax-cn"].models.map((m) => m.id);