Skip to content

Add MiniMax M3 and M2.7 provider guidance - #286

Open
octo-patch wants to merge 5 commits into
OpenCoworkAI:mainfrom
octo-patch:octo/20260708-add-target-provider-model-to-existing-provider-registry-recvoLiTkmlptY
Open

Add MiniMax M3 and M2.7 provider guidance#286
octo-patch wants to merge 5 commits into
OpenCoworkAI:mainfrom
octo-patch:octo/20260708-add-target-provider-model-to-existing-provider-registry-recvoLiTkmlptY

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 9, 2026

Copy link
Copy Markdown

Reason: add target provider/model to existing provider registry

Summary

  • Add MiniMax-M3 and MiniMax-M2.7 to the custom model presets.
  • Add exact global and China setup entries for both OpenAI-compatible and Anthropic-compatible endpoints.
  • Preserve context, reasoning, and supported input metadata when the two models use synthetic runtime resolution.
  • Update English provider documentation and public metadata.

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 typecheck
  • npm run lint (0 errors; 8 pre-existing warnings)
  • npx vitest run (1,095 passed)
  • Local SDK request capture confirmed /v1/chat/completions and /anthropic/v1/messages.

@github-actions github-actions 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.

Review mode: initial

Findings

  • [Minor] The hostContains: ['minimax'] matcher is broad and could match unintended hosts (e.g., minimax-proxy.example.com). Although the hosts list limits the primary domains, if the matching logic uses OR across hosts and hostContains, a false positive could occur. Consider narrowing hostContains to ['minimax.io', 'minimaxi'] or removing it if the explicit hosts list 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 that MiniMax-M3 is present in the fallback presets. Good.
  • Not run: additional edge-case tests for hostContains matching are not included but are optional.

Open Cowork Bot

@github-actions github-actions 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.

Review mode: follow-up after new commits

Findings

  • [Minor] Unresolved – Broad hostContains matcher
    The previous review noted that hostContains: ['minimax'] could match unintended hosts (e.g., minimax-proxy.example.com). This has not been addressed. Although the explicit hosts list narrows the primary domains, if the matching logic uses OR across hosts and hostContains, 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 /anthropic and /anthropic/v1 variants. 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

@octo-patch octo-patch changed the title Add MiniMax M3 provider guidance Add MiniMax M3 and M2.7 provider guidance Jul 13, 2026

@github-actions github-actions 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.

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 hostContains matcher – The old hostContains: ['minimax'] has been removed. The four new matcher objects use explicit hosts and narrow pathPrefixes, 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_SPECS in pi-model-resolution.ts correctly provides reasoning, input, and cost for MiniMax-M3 and MiniMax-M2.7. The lookupModelSpecs exact-match short-circuit prevents these from being overridden by prefix-based defaults from KNOWN_MODEL_SPECS. The fallback to defaults for unknown variants is tested.

  • [Minor] Model preset completenessMiniMax-M2.7 was added to API_PROVIDER_PRESETS.custom.models along with MiniMax-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 by orderCommonProviderSetups. 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

@kapelame

kapelame commented Aug 5, 2026

Copy link
Copy Markdown

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.

@github-actions github-actions 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.

Findings

  • [Minor] EXACT_MODEL_SPECS now hard-codes flat cost values 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 omitting cost so 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 not README_zh.md, which is linked from the readme. If README_zh.md mirrors 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 cost values 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

@octo-patch

Copy link
Copy Markdown
Author

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.

@github-actions github-actions 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.

Findings

  • [Minor] MiniMax M3/M2.7 cost values in EXACT_MODEL_SPECS remain 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 drop cost until 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 cost values verified against the provider's current pricing documentation? No source or link is present in the repo, and M2.7 cacheWrite: 0.375 looks 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.chat intentionally 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

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.

2 participants