Skip to content

Follow up MiniMax M3 pricing and PDF extraction defaults - #88869

Closed
NianJiuZst wants to merge 2 commits into
openclaw:mainfrom
NianJiuZst:codex/minimax-m3-support
Closed

NianJiuZst wants to merge 2 commits into
openclaw:mainfrom
NianJiuZst:codex/minimax-m3-support

Conversation

@NianJiuZst

@NianJiuZst NianJiuZst commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

MiniMax M3 support already landed separately. This PR only covers the remaining MiniMax M3 follow-up work.

  • add MiniMax M3 tiered pricing metadata and update shared cost calculation so tiered provider pricing is applied at runtime
  • switch MiniMax PDF text extraction defaults to MiniMax-M3
  • preserve /fast rewriting for MiniMax-M2.7 -> MiniMax-M2.7-highspeed while documenting and testing that MiniMax-M3 has no highspeed variant
  • refresh the remaining MiniMax docs/examples/tests that still pointed at the old M2.7 fallback/default behavior

Closes #88868.

Verification

  • node scripts/run-vitest.mjs extensions/minimax/model-definitions.test.ts
  • node scripts/run-vitest.mjs extensions/minimax/onboard.test.ts
  • node scripts/run-vitest.mjs src/llm/providers/stream-wrappers/minimax.test.ts
  • node scripts/run-vitest.mjs src/plugin-sdk/provider-stream.test.ts
  • node scripts/run-vitest.mjs src/agents/models-config.providers.minimax.test.ts
  • node scripts/run-vitest.mjs src/llm/model-utils.test.ts
  • node scripts/run-vitest.mjs src/agents/minimax-docs.test.ts
  • pnpm build

Real behavior proof

Behavior addressed: MiniMax M3 now uses the published tiered pricing during runtime cost calculation, PDF text extraction defaults to M3, and MiniMax fast mode remains an M2.7-only rewrite.
Real environment tested: local source checkout on branch codex/minimax-m3-support.
Exact steps or command run after this patch: the focused Vitest commands above plus pnpm build.
Evidence after fix: MiniMax model-definition tests, provider cost tests, docs tests, and shared cost-calculation tests pass with M3 tiered pricing assertions and the updated PDF extraction default.
Observed result after fix: M3 billing switches between the <512K and 512K-1M pricing tiers at runtime, MiniMax PDF extraction points at MiniMax-M3, and /fast keeps MiniMax-M3 unchanged.
What was not tested: live MiniMax API calls against a real account.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling extensions: minimax size: M triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels Jun 1, 2026
@clawsweeper

clawsweeper Bot commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed May 31, 2026, 11:26 PM ET / 03:26 UTC.

Summary
The PR adds MiniMax M3 tiered pricing metadata, applies tiered pricing in shared runtime cost calculation, switches MiniMax PDF text extraction defaults to M3, and updates MiniMax docs/tests for fast-mode behavior.

PR surface: Source +58, Tests +211, Docs +30. Total +299 across 18 files.

Reproducibility: yes. for the current-main gap: source inspection shows flat MiniMax M3 runtime pricing and M2.7 PDF extraction defaults remain on main. No live MiniMax reproduction is present in the PR body.

Review metrics: 2 noteworthy metrics.

  • MiniMax PDF default surfaces: 2 changed. Both MiniMax provider ids switch PDF text extraction from M2.7 to M3, which existing installations can observe after upgrade.
  • Shared runtime pricing path: 1 calculation path changed. calculateCost is used by provider streams beyond one MiniMax test, so generic tier behavior deserves maintainer review.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted live MiniMax evidence showing M3 resolves and completes through the bundled provider; screenshots, terminal output, copied live output, recordings, linked artifacts, or redacted logs are acceptable, with private details removed.
  • If the PDF default remains in scope, include proof or maintainer acknowledgement for the upgrade-visible MiniMax PDF extraction path.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists focused Vitest/build commands and explicitly says live MiniMax API calls were not tested; contributor redacted runtime proof is still required before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Contributor proof is still mock/test-only and explicitly excludes live MiniMax API calls, so the external provider/default behavior is not proven in a real setup.
  • [P1] The PR changes MiniMax PDF text extraction defaults for both API-key and Portal provider paths, so existing users may observe a different model after upgrade.
  • [P1] The shared runtime cost path now consumes tieredPricing for every runtime model, so maintainer review should confirm the generic tier behavior is acceptable beyond the MiniMax fixture.

Maintainer options:

  1. Require live MiniMax proof before merge (recommended)
    Have the contributor add redacted live evidence showing MiniMax M3 resolves and completes through the bundled provider, including the PDF/default path if maintainers want that default change.
  2. Accept the default change deliberately
    Maintainers may choose to merge the M3 PDF extraction default once they are comfortable with the upgrade-visible provider-model change.
  3. Pause the default switch
    If live proof or product agreement is not available, keep the pricing repair path separate from the MiniMax PDF default change.

Next step before merge

  • [P1] This PR should wait on contributor live proof and maintainer judgment for the upgrade-visible PDF default rather than a ClawSweeper repair lane.

Security
Cleared: The diff does not add dependencies, CI/workflow execution, package scripts, secret handling, or downloaded code paths.

Review details

Best possible solution:

Land the pricing follow-up only after redacted live MiniMax M3 proof is added and maintainers accept the M3 PDF extraction default as an intentional upgrade-visible change.

Do we have a high-confidence way to reproduce the issue?

Yes for the current-main gap: source inspection shows flat MiniMax M3 runtime pricing and M2.7 PDF extraction defaults remain on main. No live MiniMax reproduction is present in the PR body.

Is this the best way to solve the issue?

Unclear as merge-ready: the code direction is now a plausible narrow fix for MiniMax tiered pricing, but the PDF default change and external-provider behavior still need redacted live proof and maintainer acceptance.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 45b5f876ddf0.

Label changes

Label justifications:

  • P2: This is a bounded MiniMax provider/default and cost-reporting improvement with limited blast radius, not an active outage.
  • merge-risk: 🚨 compatibility: The PR changes provider defaults and shared runtime cost behavior that existing users can observe after upgrade.
  • merge-risk: 🚨 auth-provider: The PR changes MiniMax provider model choice and PDF extraction defaults for both API-key and Portal provider paths.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists focused Vitest/build commands and explicitly says live MiniMax API calls were not tested; contributor redacted runtime proof is still required before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +58, Tests +211, Docs +30. Total +299 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 6 66 8 +58
Tests 7 221 10 +211
Docs 5 36 6 +30
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 323 24 +299

What I checked:

  • Repository policy read: Read the full root AGENTS.md and scoped docs/extensions/src/agents/src/plugin-sdk guides; provider default changes, external API proof, and real behavior proof requirements affected this review. (AGENTS.md:1, 45b5f876ddf0)
  • Live PR context: Live GitHub API shows this PR is open, authored by an external contributor, has no protected labels, and its body still says live MiniMax API calls were not tested.
  • Previous code finding fixed at current head: The second PR commit changes calculateCost to select the pricing tier from usage.input + usage.cacheRead and adds a regression where 400K input plus 200K cacheRead crosses the 512K MiniMax M3 tier threshold. (src/llm/model-utils.ts:23, 3ed049ce34f5)
  • MiniMax pricing contract checked: Official MiniMax Pay as You Go docs list MiniMax-M3 standard pricing tiers at <=512k and >512k input tokens, with the note that input tokens including cache hits above 512k use the higher tier. (platform.minimax.io)
  • Current main still lacks runtime tiered pricing: Current main calculateCost multiplies flat input/output/cacheRead/cacheWrite rates only, so the PR addresses a real remaining integration gap. (src/llm/model-utils.ts:3, 45b5f876ddf0)
  • PDF default changes both MiniMax provider ids: The PR changes both runtime provider objects and plugin manifest metadata from MiniMax-M2.7 to MiniMax-M3 for PDF text extraction. (extensions/minimax/media-understanding-provider.ts:11, 3ed049ce34f5)

Likely related people:

  • steipete: Commit 0369672 added the current MiniMax M3 model/provider/docs baseline and owns the central files this follow-up changes. (role: recent MiniMax M3 feature author; confidence: high; commits: 0369672691cf; files: extensions/minimax/model-definitions.ts, extensions/minimax/provider-models.ts, extensions/minimax/media-understanding-provider.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Jun 1, 2026
@NianJiuZst
NianJiuZst force-pushed the codex/minimax-m3-support branch from 2048d32 to 8d4c431 Compare June 1, 2026 02:40
@NianJiuZst NianJiuZst changed the title Add MiniMax M3 support to the bundled MiniMax provider Follow up MiniMax M3 pricing and PDF extraction defaults Jun 1, 2026
@NianJiuZst

Copy link
Copy Markdown
Contributor Author

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

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: minimax gateway Gateway runtime merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow up MiniMax M3 pricing and PDF extraction defaults

1 participant