[WRONG BRANCH] fix(minimax): refresh MiniMax-M3 metadata with video input and current pricing - #706
Conversation
|
This pull request currently targets @octo-patch Please retarget this PR to Its title has been prefixed with This pull request is being kept as a draft automatically. Once every issue above is resolved, it will be marked ready for review again. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe metadata generator expands model input support from text and image to include video across raw types, generated interfaces, and parsed metadata serialization. ChangesMetadata input support
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 154a9eb457
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "deepseek": [["deepseek-v4-flash",1000000,384000,"text",1,null,0.14,0.28,0.0028,0],["deepseek-v4-pro",1000000,384000,"text",1,null,0.435,0.87,0.003625,0]], | ||
| "google": [["gemini-1.5-flash",1000000,8192,"text,image",0,null,0.075,0.3,0.01875,0],["gemini-1.5-flash-8b",1000000,8192,"text,image",0,null,0.0375,0.15,0.01,0],["gemini-1.5-pro",1000000,8192,"text,image",0,null,1.25,5,0.3125,0],["gemini-2.0-flash",1048576,8192,"text,image",0,null,0.1,0.4,0.025,0],["gemini-2.0-flash-lite",1048576,8192,"text,image",0,null,0.075,0.3,0,0],["gemini-2.5-flash",1048576,65536,"text,image",1,null,0.3,2.5,0.03,0],["gemini-2.5-flash-lite",1048576,65536,"text,image",1,null,0.1,0.4,0.01,0],["gemini-2.5-flash-lite-preview-06-17",1048576,65536,"text,image",1,null,0.1,0.4,0.025,0],["gemini-2.5-flash-lite-preview-09-2025",1048576,65536,"text,image",1,null,0.1,0.4,0.025,0],["gemini-2.5-flash-preview-04-17",1048576,65536,"text,image",1,null,0.15,0.6,0.0375,0],["gemini-2.5-flash-preview-05-20",1048576,65536,"text,image",1,null,0.15,0.6,0.0375,0],["gemini-2.5-flash-preview-09-2025",1048576,65536,"text,image",1,null,0.3,2.5,0.075,0],["gemini-2.5-pro",1048576,65536,"text,image",1,null,1.25,10,0.125,0],["gemini-2.5-pro-preview-05-06",1048576,65536,"text,image",1,null,1.25,10,0.31,0],["gemini-2.5-pro-preview-06-05",1048576,65536,"text,image",1,null,1.25,10,0.31,0],["gemini-3-flash-preview",1048576,65536,"text,image",1,null,0.5,3,0.05,0],["gemini-3-pro-preview",1048576,65536,"text,image",1,null,2,12,0.2,0],["gemini-3.1-flash-lite",1048576,65536,"text,image",1,null,0.25,1.5,0.025,0],["gemini-3.1-flash-lite-preview",1048576,65536,"text,image",1,null,0.25,1.5,0.025,0],["gemini-3.1-pro-preview",1048576,65536,"text,image",1,null,2,12,0.2,0],["gemini-3.1-pro-preview-customtools",1048576,65536,"text,image",1,null,2,12,0.2,0],["gemini-3.5-flash",1048576,65536,"text,image",1,null,1.5,9,0.15,0],["gemini-flash-latest",1048576,65536,"text,image",1,null,0.3,2.5,0.075,0],["gemini-flash-lite-latest",1048576,65536,"text,image",1,null,0.1,0.4,0.025,0],["gemini-live-2.5-flash",128000,8000,"text,image",1,null,0.5,2,0,0],["gemini-live-2.5-flash-preview-native-audio",131072,65536,"text",1,null,0.5,2,0,0],["gemma-3-27b-it",131072,8192,"text,image",0,null,0,0,0,0],["gemma-4-26b",256000,8192,"text,image",1,null,0,0,0,0],["gemma-4-26b-a4b-it",262144,32768,"text,image",1,null,0,0,0,0],["gemma-4-26b-it",256000,8192,"text,image",1,null,0,0,0,0],["gemma-4-31b",256000,8192,"text,image",1,null,0,0,0,0],["gemma-4-31b-it",262144,32768,"text,image",1,null,0,0,0,0],["gemma-4-E2B-it",131072,8192,"text,image",1,null,0,0,0,0],["gemma-4-E4B-it",131072,8192,"text,image",1,null,0,0,0,0]], | ||
| "minimax": [["MiniMax-M2",196608,128000,"text",1,null,0.3,1.2,0,0],["MiniMax-M2.1",204800,131072,"text",1,null,0.3,1.2,0,0],["MiniMax-M2.5",204800,131072,"text",1,null,0.3,1.2,0.03,0.375],["MiniMax-M2.5-highspeed",204800,131072,"text",1,null,0.6,2.4,0.06,0.375],["MiniMax-M2.5-lightning",204800,32000,"text",1,null,0.3,2.4,0,0],["MiniMax-M2.7",204800,131072,"text",1,null,0.3,1.2,0.06,0.375],["MiniMax-M2.7-highspeed",204800,131072,"text",1,null,0.6,2.4,0.06,0.375],["minimax-m3",512000,128000,"text,image",1,null,0.6,2.4,0.12,0],["MiniMax-M3",1000000,128000,"text,image",1,null,0.3,1.2,0.06,0]], | ||
| "minimax": [["MiniMax-M2",196608,128000,"text",1,null,0.3,1.2,0,0],["MiniMax-M2.1",204800,131072,"text",1,null,0.3,1.2,0,0],["MiniMax-M2.5",204800,131072,"text",1,null,0.3,1.2,0.03,0.375],["MiniMax-M2.5-highspeed",204800,131072,"text",1,null,0.6,2.4,0.06,0.375],["MiniMax-M2.5-lightning",204800,32000,"text",1,null,0.3,2.4,0,0],["MiniMax-M2.7",204800,131072,"text",1,null,0.3,1.2,0.06,0.375],["MiniMax-M2.7-highspeed",204800,131072,"text",1,null,0.6,2.4,0.06,0.375],["minimax-m3",512000,128000,"text,image",1,null,0.6,2.4,0.12,0],["MiniMax-M3",1000000,128000,"text,image,video",1,null,0.6,2.4,0.12,0]], |
There was a problem hiding this comment.
Preserve the short-context MiniMax-M3 rate
MiniMax's PAYG pricing is tiered at the 512k input-token boundary: the current discounted <=512k rate is $0.30 input / $1.20 output / $0.06 cache-read, while $0.60 / $2.40 / $0.12 is the >512k tier (https://platform.minimax.io/docs/guides/pricing-paygo). Because usage/cost.ts consumes this metadata as one flat per-token rate, this change doubles the cost estimate shown in logs for every MiniMax-M3 request that stays below 512k input tokens. Please either add tier-aware pricing keyed off the request's input token count or keep the <=512k current rate in the flat row until tiering exists.
Useful? React with 👍 / 👎.
| "deepseek": [["deepseek-v4-flash",1000000,384000,"text",1,null,0.14,0.28,0.0028,0],["deepseek-v4-pro",1000000,384000,"text",1,null,0.435,0.87,0.003625,0]], | ||
| "google": [["gemini-1.5-flash",1000000,8192,"text,image",0,null,0.075,0.3,0.01875,0],["gemini-1.5-flash-8b",1000000,8192,"text,image",0,null,0.0375,0.15,0.01,0],["gemini-1.5-pro",1000000,8192,"text,image",0,null,1.25,5,0.3125,0],["gemini-2.0-flash",1048576,8192,"text,image",0,null,0.1,0.4,0.025,0],["gemini-2.0-flash-lite",1048576,8192,"text,image",0,null,0.075,0.3,0,0],["gemini-2.5-flash",1048576,65536,"text,image",1,null,0.3,2.5,0.03,0],["gemini-2.5-flash-lite",1048576,65536,"text,image",1,null,0.1,0.4,0.01,0],["gemini-2.5-flash-lite-preview-06-17",1048576,65536,"text,image",1,null,0.1,0.4,0.025,0],["gemini-2.5-flash-lite-preview-09-2025",1048576,65536,"text,image",1,null,0.1,0.4,0.025,0],["gemini-2.5-flash-preview-04-17",1048576,65536,"text,image",1,null,0.15,0.6,0.0375,0],["gemini-2.5-flash-preview-05-20",1048576,65536,"text,image",1,null,0.15,0.6,0.0375,0],["gemini-2.5-flash-preview-09-2025",1048576,65536,"text,image",1,null,0.3,2.5,0.075,0],["gemini-2.5-pro",1048576,65536,"text,image",1,null,1.25,10,0.125,0],["gemini-2.5-pro-preview-05-06",1048576,65536,"text,image",1,null,1.25,10,0.31,0],["gemini-2.5-pro-preview-06-05",1048576,65536,"text,image",1,null,1.25,10,0.31,0],["gemini-3-flash-preview",1048576,65536,"text,image",1,null,0.5,3,0.05,0],["gemini-3-pro-preview",1048576,65536,"text,image",1,null,2,12,0.2,0],["gemini-3.1-flash-lite",1048576,65536,"text,image",1,null,0.25,1.5,0.025,0],["gemini-3.1-flash-lite-preview",1048576,65536,"text,image",1,null,0.25,1.5,0.025,0],["gemini-3.1-pro-preview",1048576,65536,"text,image",1,null,2,12,0.2,0],["gemini-3.1-pro-preview-customtools",1048576,65536,"text,image",1,null,2,12,0.2,0],["gemini-3.5-flash",1048576,65536,"text,image",1,null,1.5,9,0.15,0],["gemini-flash-latest",1048576,65536,"text,image",1,null,0.3,2.5,0.075,0],["gemini-flash-lite-latest",1048576,65536,"text,image",1,null,0.1,0.4,0.025,0],["gemini-live-2.5-flash",128000,8000,"text,image",1,null,0.5,2,0,0],["gemini-live-2.5-flash-preview-native-audio",131072,65536,"text",1,null,0.5,2,0,0],["gemma-3-27b-it",131072,8192,"text,image",0,null,0,0,0,0],["gemma-4-26b",256000,8192,"text,image",1,null,0,0,0,0],["gemma-4-26b-a4b-it",262144,32768,"text,image",1,null,0,0,0,0],["gemma-4-26b-it",256000,8192,"text,image",1,null,0,0,0,0],["gemma-4-31b",256000,8192,"text,image",1,null,0,0,0,0],["gemma-4-31b-it",262144,32768,"text,image",1,null,0,0,0,0],["gemma-4-E2B-it",131072,8192,"text,image",1,null,0,0,0,0],["gemma-4-E4B-it",131072,8192,"text,image",1,null,0,0,0,0]], | ||
| "minimax": [["MiniMax-M2",196608,128000,"text",1,null,0.3,1.2,0,0],["MiniMax-M2.1",204800,131072,"text",1,null,0.3,1.2,0,0],["MiniMax-M2.5",204800,131072,"text",1,null,0.3,1.2,0.03,0.375],["MiniMax-M2.5-highspeed",204800,131072,"text",1,null,0.6,2.4,0.06,0.375],["MiniMax-M2.5-lightning",204800,32000,"text",1,null,0.3,2.4,0,0],["MiniMax-M2.7",204800,131072,"text",1,null,0.3,1.2,0.06,0.375],["MiniMax-M2.7-highspeed",204800,131072,"text",1,null,0.6,2.4,0.06,0.375],["minimax-m3",512000,128000,"text,image",1,null,0.6,2.4,0.12,0],["MiniMax-M3",1000000,128000,"text,image",1,null,0.3,1.2,0.06,0]], | ||
| "minimax": [["MiniMax-M2",196608,128000,"text",1,null,0.3,1.2,0,0],["MiniMax-M2.1",204800,131072,"text",1,null,0.3,1.2,0,0],["MiniMax-M2.5",204800,131072,"text",1,null,0.3,1.2,0.03,0.375],["MiniMax-M2.5-highspeed",204800,131072,"text",1,null,0.6,2.4,0.06,0.375],["MiniMax-M2.5-lightning",204800,32000,"text",1,null,0.3,2.4,0,0],["MiniMax-M2.7",204800,131072,"text",1,null,0.3,1.2,0.06,0.375],["MiniMax-M2.7-highspeed",204800,131072,"text",1,null,0.6,2.4,0.06,0.375],["minimax-m3",512000,128000,"text,image",1,null,0.6,2.4,0.12,0],["MiniMax-M3",1000000,128000,"text,image,video",1,null,0.6,2.4,0.12,0]], |
There was a problem hiding this comment.
Refresh the case-variant MiniMax-M3 row too
MiniMax providers opt into case-insensitive metadata lookup, but this line now has two MiniMax-M3 case variants with different capabilities: the refreshed MiniMax-M3 row has text,image,video and 1M context, while the earlier minimax-m3 row still has only text,image and 512k context. In lower-case configured/live IDs, and even in getJawcodeModelMetadataCaseInsensitive("minimax", "MiniMax-M3"), callers hit the stale row first, so the catalog still blocks video input and advertises the wrong context despite this refresh. Please update or deduplicate the case variant so every MiniMax-M3 lookup returns the refreshed capabilities.
Useful? React with 👍 / 👎.
|
Thanks for this — the video finding is correct and I've applied it, but not in this shape. Closing with the reasoning, since two of the three premises don't hold. Video input: right, and now landed upstream. MiniMax documents video for M3 and only M3 — the M2 series takes text and tool blocks but not image or video. Fixed at the source in jawcode as One correction worth recording: the grounding is the OpenAI-compatible endpoint, not the Anthropic one. Our Pricing: the premise is wrong, so this part is not adopted. $0.30/$1.20 isn't stale — it's MiniMax's standing 50% discounted rate for the ≤512K input tier. $0.60/$2.40 is that tier's list price and simultaneously the >512K rate. Both are official numbers, so choosing which one a catalog carries is a policy decision rather than a staleness fix. It also happens to be the wrong direction here: our row flattens a 1,000,000-token context into a single entry, so adopting list price would overstate the bill for most real requests. Cache-read $0.06 vs $0.12 splits the same way. If we ever want list pricing, it needs a tiered-cost model first, and that's a separate discussion. Editing the generated file gets reverted. There's a wrinkle behind that worth flagging: the committed generated file is already 95 models and 63 price rows out of sync with its source, plus a Branch target. This PR targets One honest limitation on the feature itself: advertising Closing as superseded by the upstream fix. The video catch was a good one. |
MiniMax-M3 accepts video, and the jawcode source now says so (jawcode 762549f),
so widen the generator's input-modality type and the type it emits from
("text" | "image")[] to ("text" | "image" | "video")[].
Type-only. RawModel.input is consumed via input.join(","), the row field is
string | null, and rowToMetadata casts unchecked — so tsc passes either way.
This keeps the declared type honest rather than fixing a compile error.
src/generated/jawcode-model-metadata.ts is deliberately NOT regenerated here.
That file is already 95 models / 63 price rows out of sync with its source, so a
regeneration would sweep unrelated price changes into cost accounting alongside
one modality fix. The resync is its own unit of work, with the delta reviewed on
its own merits and a drift guard added; the M3 video row lands there as a clean
one-row delta.
Reported as #706, which proposed the same type widening but hand-edited the
generated file and also swapped MiniMax's discounted rates for list prices.
Reason: MiniMax-M3 metadata was stale — it omitted video input and kept the old $0.30/$1.20 per-million input/output pricing instead of $0.60/$2.40 with $0.12 cache reads.
Changes
src/generated/jawcode-model-metadata.ts: refresh theminimaxbundle'sMiniMax-M3row — addvideoto its input modalities and update pricing to$0.60input /$2.40output per million tokens with$0.12cache reads. The 1,000,000-token context window is preserved.scripts/generate-jawcode-metadata.ts: widen the model input-modality type, and the interface/cast it emits, from("text" | "image")[]to("text" | "image" | "video")[]so the generator can carry video input and the generated metadata stays consistent with its source.Checks
bun x tsc --noEmit— passes.bun test tests/codex-catalog.test.ts tests/provider-registry-parity.test.ts tests/minimax-reasoning-split.test.ts tests/usage-cost.test.ts— 187 pass, 0 fail.Summary by CodeRabbit