fix(ai): honor MiniMax M3 official 1M routes - #3773
Conversation
The existing MiniMax M3 policy forced every first-class route back to 512K despite official Claude Code and Codex Token Plan contracts documenting a 1M context window. Scope the correction to the four first-class regional MiniMax routes and add route and alias regression coverage. Lore-id: issue-3770\nConstraint: preserve unrelated aliases and openai-codex\nConstraint: keep billing/provider boundaries route-specific\nRejected: blanket model-ID-only widening | aliases lack independent contract evidence\nConfidence: high\nScope-risk: narrow\nReversibility: straightforward\nTested: focused MiniMax/model-thinking tests; package check; repository build; CLI smoke\nNot-tested: live MiniMax billing/API behavior
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7334d6935c
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| model.provider === "minimax-code" || | ||
| model.provider === "minimax-code-cn") | ||
| ) { | ||
| model.contextWindow = 1_000_000; |
There was a problem hiding this comment.
Regenerate the exported model catalog
This policy now reports 1,000,000 tokens through getBundledModel, but the committed generated packages/ai/src/models.json still contains 512000 for all four affected providers. Because the package publicly exports @gajae-code/ai/models.json, consumers that import the catalog directly continue receiving the stale limit, so the fix depends on which supported API surface they use. Run bun run generate-models and commit the regenerated catalog alongside this policy change.
AGENTS.md reference: AGENTS.md:L64-L69
Useful? React with 👍 / 👎.
|
Census reassignment receipt: own MiniMax provider/model policy batch. Exact head: The implementation evidence remains attributable to this PR: route-scoped policy, focused tests, package check, smoke, build, and local GJC quality-gate receipt. It is not mergeable under the census rule because GitHub currently reports — |
|
REQUEST_CHANGES Reviewed read-only at exact PR head Exact current state
Blocking findings
Hostile-review dispositionThe intended product boundary itself is sound: current official MiniMax international and China documentation supports a 1,000,000-token MiniMax-M3 window for the represented Anthropic and Contributor ledger: this is an owner-authored same-repository PR ( Terminal verdict: REQUEST_CHANGES Signed: GJC / Yeachan-Heo via GitHub CLI |
Summary
openai-codexEvidence
Official MiniMax Token Plan sources:
MiniMax-M3[1m], auto-compact window1000000)model_provider = "minimax",wire_api = "responses",model_context_window = 1000000)Verification
bun test packages/ai/test/issue-385-minimax-m3.test.ts packages/ai/test/model-thinking.test.tsbun test packages/ai/test/issue-385-minimax-m3.test.ts packages/ai/test/generate-models.test.ts packages/ai/test/startup-imports.test.ts packages/ai/test/openai-codex-default.test.tsbun --cwd=packages/ai run checkbun run ci:test:smokebun run buildgit diff --checkFull repository
bun run checkwas started and is still being observed in the lane; focused/package/build/smoke commands completed successfully.Closes #3770
—
[repo owner's gaebal-gajae (clawdbot) 🦞]