Skip to content

fix(ai): honor MiniMax M3 official 1M routes - #3773

Open
Yeachan-Heo wants to merge 1 commit into
devfrom
issue-974-minimax-1m-recheck
Open

fix(ai): honor MiniMax M3 official 1M routes#3773
Yeachan-Heo wants to merge 1 commit into
devfrom
issue-974-minimax-1m-recheck

Conversation

@Yeachan-Heo

Copy link
Copy Markdown
Owner

Summary

  • scope MiniMax M3's 1,000,000-token context correction to the four first-class regional MiniMax routes
  • preserve unrelated catalog aliases and providers, including openai-codex
  • add route-specific policy, boundary, and alias-preservation regressions

Evidence

Official MiniMax Token Plan sources:

Verification

  • bun test packages/ai/test/issue-385-minimax-m3.test.ts packages/ai/test/model-thinking.test.ts
  • bun 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.ts
  • bun --cwd=packages/ai run check
  • bun run ci:test:smoke
  • bun run build
  • git diff --check

Full repository bun run check was started and is still being observed in the lane; focused/package/build/smoke commands completed successfully.

Closes #3770


[repo owner's gaebal-gajae (clawdbot) 🦞]

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

Census reassignment receipt: own MiniMax provider/model policy batch.

Exact head: 7334d6935ca76572adc30980480ca31f3746a5f9. Current dev: bf37cb30d0442926ad3fb2b2c6fc26a6d3edeffc.

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 UNSTABLE and the affected-path plan and evidence producer checks fail. No mutation or merge was performed. External blocker evidence is recorded in artifacts/census-provider-model-policy-2026-08-03.json.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

REQUEST_CHANGES

Reviewed read-only at exact PR head 7334d6935ca76572adc30980480ca31f3746a5f9.

Exact current state

  • GitHub-recorded PR base: dev at bf37cb30d0442926ad3fb2b2c6fc26a6d3edeffc
  • Live dev: 732856b3ccb3fade6e9fbc17908a4fbca5a7682f
  • Actual merge base with live dev: caeeecbc52e5ff0f82e967c6c8f58d4c50d4f0da
  • Divergence: 48 live-dev-only commits; 1 PR-only commit
  • State: open, non-draft, MERGEABLE but UNSTABLE; current merge simulation is textually clean
  • Exact-head checks: 6 pass, 9 skipped, 3 fail. Dev CI run 30775302298 is failed; Public site sync run 30775302280 passed only its local-public-surface job.

Blocking findings

  1. The head does not contain even its recorded base, so exact-head CI correctly failed closed. Affected path validation / plan emitted: Exact-head CI requires this PR head to contain base bf37cb30...; rebase onto current dev. The plan failure left the canonical plan fields empty, skipped every affected shard, failed the evidence producer, and failed the protected aggregate. The five green GJC state-gate jobs and green public-sync surface do not validate this change. Update this same PR branch onto live dev and obtain fresh natural exact-head CI; do not open a replacement PR or bypass/rerun the failed topology manually.

  2. The supported public model surfaces disagree. applyGeneratedModelPolicy() makes getBundledModel() return 1_000_000 for the four lower-case first-class minimax-m3 routes, but the committed generated packages/ai/src/models.json still exports 512000 for minimax, minimax-cn, minimax-code, and minimax-code-cn. packages/ai/package.json explicitly exports @gajae-code/ai/models.json, so direct catalog consumers retain the stale contract. The generator applies this policy before serialization; regenerate and commit the expected catalog updates, then add a direct-JSON regression alongside the runtime accessor assertions. Automated finding discussion_r3700760894 is valid and unresolved.

  3. The observable @gajae-code/ai contract change has no [Unreleased] changelog entry. Add the directly affected package changelog entry; no release operation is requested.

Hostile-review disposition

The 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 /v1 OpenAI-compatible routes. The four-provider whitelist matches the existing first-class descriptors and does not widen inspected openai-codex, opencode-go, opencode-zen, venice, or minimax-v3 contracts. While repairing the public catalog, cover real out-of-scope aliases rather than relying only on synthetic policy fixtures.

Contributor ledger: this is an owner-authored same-repository PR (Yeachan-Heo; exact commit authored by gaebal-gajae). Historical provenance remains with #834 by @simongonzalezdc, whose earlier four-route 1M correction was later reverted by owner PR #975. No contributor-standing or ownership-confirmation gate blocks the review; the blockers are exact-head topology and incomplete public-surface delivery.

Terminal verdict: REQUEST_CHANGES

Signed: GJC / Yeachan-Heo via GitHub CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant