Add MiniMax M3 and M2.7 provider guidance - #286
Conversation
There was a problem hiding this comment.
Review mode: initial
Findings
- [Minor] The
hostContains: ['minimax']matcher is broad and could match unintended hosts (e.g.,minimax-proxy.example.com). Although thehostslist limits the primary domains, if the matching logic uses OR acrosshostsandhostContains, a false positive could occur. Consider narrowinghostContainsto['minimax.io', 'minimaxi']or removing it if the explicithostslist is sufficient.
Summary
The PR adds the MiniMax-M3 model to the custom provider presets and updates the MiniMax provider guidance to use the global endpoint https://api.minimax.io/v1 and the China endpoint https://api.minimaxi.com with support for /anthropic/v1 path prefix. The changes are well-tested and maintain backward compatibility with existing MiniMax URLs (e.g., api.minimax.chat is removed, which is intentional per the PR summary). No blockers or regressions identified.
Testing
tests/provider-guidance.test.ts: Adds detection tests for both global and China MiniMax endpoints. Coverage is adequate.tests/api-config-state.test.ts: Verifies thatMiniMax-M3is present in the fallback presets. Good.- Not run: additional edge-case tests for
hostContainsmatching are not included but are optional.
Open Cowork Bot
There was a problem hiding this comment.
Review mode: follow-up after new commits
Findings
-
[Minor] Unresolved – Broad
hostContainsmatcher
The previous review noted thathostContains: ['minimax']could match unintended hosts (e.g.,minimax-proxy.example.com). This has not been addressed. Although the explicithostslist narrows the primary domains, if the matching logic uses OR acrosshostsandhostContains, false positives remain possible. Consider narrowing to['minimax.io', 'minimaxi']or removing if the explicit list is sufficient. (src/shared/api-provider-guidance.ts:138) -
[Minor] Path prefix change is consistent
The path prefix was changed from'/anthropic/v1'to'/anthropic', allowing both/anthropicand/anthropic/v1variants. The test case was updated accordingly and correctly matches. No regression observed.
Summary
The PR adds the MiniMax-M3 model to the custom provider presets and updates the MiniMax guidance endpoints. The changes are well-tested and maintain backward compatibility. The sole unresolved minor issue from the previous review (broad hostContains) remains, but it is a low-risk concern. No blockers or regressions identified.
Open Cowork Bot
There was a problem hiding this comment.
Review mode: follow-up after new commits
Findings
No new issues introduced. All changes since the previous review are well-structured and address the previously flagged concern.
-
[Resolved] Broad
hostContainsmatcher – The oldhostContains: ['minimax']has been removed. The four newmatcherobjects use explicithostsand narrowpathPrefixes, which eliminates false-positive matches on unintended hosts (e.g.,minimax-proxy.example.com). Test coverage confirms this. -
[Minor] Model metadata extension – The
EXACT_MODEL_SPECSinpi-model-resolution.tscorrectly providesreasoning,input, andcostforMiniMax-M3andMiniMax-M2.7. ThelookupModelSpecsexact-match short-circuit prevents these from being overridden by prefix-based defaults fromKNOWN_MODEL_SPECS. The fallback to defaults for unknown variants is tested. -
[Minor] Model preset completeness –
MiniMax-M2.7was added toAPI_PROVIDER_PRESETS.custom.modelsalong withMiniMax-M3. Test confirms both are present.
Residual Risks / Testing Gaps
- Migration of saved setup IDs: If any persisted configuration (outside the scope of this PR) stored the old
'minimax'setup ID, it would no longer be recognized byorderCommonProviderSetups. However, setup IDs are not persisted in user config; they are derived from base URL matching. No practical impact expected. - MiniMax-M3 pricing model: The comment mentions that M3 pricing is tiered and cannot be expressed in the flat cost schema. The cost defaults to zero, which is acceptable because cost display is informational for the user. No functional regression.
Testing
Existing tests pass with the updated assertions. The new test cases cover:
- MiniMax endpoint detection for all four region/protocol combinations (
provider-guidance.test.ts). - Synthetic model metadata for
MiniMax-M3,MiniMax-M2.7, and an unknown variant (pi-model-resolution.test.ts). - Presence of both models in the custom presets (
api-config-state.test.ts).
No additional manual testing required. All automated.
Open Cowork Bot
|
Thanks for the review. I updated the MiniMax-M3 model metadata to include the target pricing and pushed a new commit. GitHub checks are running. |
There was a problem hiding this comment.
Findings
-
[Minor]
EXACT_MODEL_SPECSnow hard-codes flatcostvalues for MiniMax-M3 and MiniMax-M2.7 (src/main/agent/pi-model-resolution.ts). MiniMax-M3 pricing is tiered by input length and service tier, so a single flat value will be inaccurate for many users; the previous comment explaining this limitation was removed. At minimum, keep a comment that these values are approximations. If they are not provider-verified, consider omittingcostso the UI does not display a potentially wrong estimate.Suggested fix:
// M3 pricing is tiered by input length and service tier; flat values below are approximations. cost: { input: 0.6, output: 2.4, cacheRead: 0.12, cacheWrite: 0 }
-
[Minor] The PR updates English docs (
readme.md,llms.txt,website/public/llms-full.txt) but notREADME_zh.md, which is linked from the readme. IfREADME_zh.mdmirrors the provider table, it will still show the old MiniMax endpoint/model. Update it for consistency.Suggested fix:
// In README_zh.md, update the MiniMax row to match readme.md: // Global: https://api.minimax.io/v1 (OpenAI) or https://api.minimax.io/anthropic (Anthropic) // China: https://api.minimaxi.com/v1 (OpenAI) or https://api.minimaxi.com/anthropic (Anthropic)
Questions
- Are the MiniMax M3/M2.7
costvalues verified against the provider's pricing documentation? The repo has no source for these numbers. - Does MiniMax-M2.7 support image input? If so,
input: ['text']for the M2.7 spec may be too restrictive.
Summary
Review mode: follow-up after new commits
Review policy: advisory — the check reflects automation health/completion only; it does not approve the PR or resolve findings.
The diff correctly separates MiniMax global/China OpenAI/Anthropic endpoints, adds exact model specs for MiniMax-M3/MiniMax-M2.7, and updates tests/docs. No blockers or major issues found. Residual risks are the unverified hard-coded cost values and possibly restrictive input metadata.
Testing
Not run (automation). Existing tests were updated for the new MiniMax setup detection and the M3/M2.7 model metadata; no missing test coverage was identified for the changed behavior.
Open Cowork Bot
|
Thanks for the review. I updated README_zh.md to match the MiniMax global/China OpenAI and Anthropic endpoints and the MiniMax-M3/MiniMax-M2.7 recommendations, then pushed a new commit. I ran npm test -- --run tests/provider-guidance.test.ts tests/api-config-state.test.ts tests/pi-model-resolution.test.ts. |
There was a problem hiding this comment.
Findings
-
[Minor] MiniMax M3/M2.7
costvalues inEXACT_MODEL_SPECSremain hard-coded with no provenance or approximation note (src/main/agent/pi-model-resolution.ts:106-113). MiniMax pricing is tiered and can change; showing a flat estimate in the UI may mislead users. Keep at least a comment that these values are approximate, or dropcostuntil provider-verified.Suggested fix:
// MiniMax pricing is tiered and may change; values below are approximations. // TODO: verify against provider pricing before relying on these estimates. cost: { input: 0.6, output: 2.4, cacheRead: 0.12, cacheWrite: 0 }
Questions
- Are the MiniMax M3/M2.7
costvalues verified against the provider's current pricing documentation? No source or link is present in the repo, and M2.7cacheWrite: 0.375looks unusual. - Does MiniMax-M2.7 support image input? If it does,
input: ['text']for the M2.7 spec (src/main/agent/pi-model-resolution.ts:114-120) may be too restrictive. - Is
api.minimax.chatintentionally dropped from MiniMax detection? Existing configs using the old host will no longer match any MiniMax setup (src/shared/api-provider-guidance.ts:131-190), so provider guidance will fall back to generic behavior. If the old host is still valid for existing users, consider keeping an alias matcher.
Summary
Review mode: follow-up after new commits
Review policy: advisory — the check reflects automation health/completion only; it does not approve the PR or resolve findings.
No blockers or major issues were found. The README_zh MiniMax row is now updated, resolving the previously reported documentation inconsistency. The MiniMax global/China OpenAI/Anthropic guidance split is well structured, tests cover the new endpoints and model metadata, and the synthetic model metadata changes are localized. The remaining concerns are the unverified hard-coded cost values, the potentially restrictive M2.7 input metadata, and the removal of the old MiniMax host from detection.
Testing
Not run (automation). The PR adds unit tests for MiniMax metadata and provider-guidance detection; no missing coverage was identified for the changed behavior beyond the open questions above.
Open Cowork Bot
Reason: add target provider/model to existing provider registry
Summary
Checks
npx vitest run tests/provider-guidance.test.ts tests/api-config-state.test.ts tests/pi-model-resolution.test.ts(47 passed)npm run typechecknpm run lint(0 errors; 8 pre-existing warnings)npx vitest run(1,095 passed)/v1/chat/completionsand/anthropic/v1/messages.