feat(providers): add MiniMax provider support#403
Conversation
There was a problem hiding this comment.
Review mode: initial
Findings
-
[Minor] Test description in
migrateLegacyToV3test updated to say "all supported builtin providers" but the test body may still only verify the original three providers (anthropic, openai, openrouter). If the test does not assert the newly addedminimaxprovider, the description is misleading.
Suggested fix: Update the test body or revert the description if the test should remain focused on the original set. -
[Minor] The validation endpoint for MiniMax in
packages/providers/src/validate.ts:64appliesnormalizeValidateBaseUrlwhich strips/v1, then appends/v1/models. If a user configures an Anthropic-compatible base (e.g.https://api.minimax.io/anthropic), the validation URL becomeshttps://api.minimax.io/anthropic/v1/models, which is unlikely to return valid model data. This is consistent with how other providers handle custom bases, but worth documenting or improving for Anthropic-compatible endpoints.
Questions
- None.
Summary
The PR adds MiniMax as a built-in provider following the existing static-hint architecture. Changes are consistent with project patterns: no new dependencies, proper allowlist for environment keys, appropriate static model catalog with tiered pricing, and addition to the onboarding provider list. Tests cover validation, config registration, and Codex import. The PR is clean and directionally sound.
Testing
- New tests in
packages/shared/src/config.test.tsverify MiniMax model registration, endpoints, and catalog. - New test in
packages/providers/src/validate.test.tsverifies MiniMax validation endpoint and Bearer auth. - Updated test in
apps/desktop/src/main/imports/codex-config.test.tsverifiesMINIMAX_API_KEYacceptance.
Open-CoDesign Bot
Signed-off-by: octo-patch <266937838+octo-patch@users.noreply.github.com>
13253b1 to
4c212a0
Compare
There was a problem hiding this comment.
Review mode: follow-up after new commits
Findings
-
[Minor] Test description in
migrateLegacyToV3test changed to "seeds all supported builtin providers" (packages/shared/src/config.test.ts:352) but the test body still only verifies the original three (anthropic, openai, openrouter). The description is misleading. If no change is intended, revert the description. Ifminimaxshould be verified, update the test body. -
[Minor] The MiniMax validation endpoint in
packages/providers/src/validate.ts:64callsnormalizeValidateBaseUrlwhich strips/v1, then appends/v1/models. For a user who configures an Anthropic-compatible base likehttps://api.minimax.io/anthropic, the validation URL becomeshttps://api.minimax.io/anthropic/v1/modelswhich is unlikely to return valid model data. Consider either documenting this limitation or adding a note that Anthropic-compatible bases are not supported for validation.
Summary
Both findings from the initial review remain unaddressed — no new changes were observed between the previous review commit (13253b1) and the current HEAD (4c212a0). The PR is otherwise a clean, well-structured addition that follows existing conventions. The two minors are non-blocking but should be resolved before merge.
Testing
- No new tests added since prior review.
- The existing test suite covers validation, config registration, and Codex import for MiniMax. The
migrateLegacyToV3test description discrepancy persists.
Open-CoDesign Bot
Reason: add target provider/model to existing provider registry.
Summary
MiniMax-M3andMiniMax-M2.7with defaults, context windows, modalities, thinking modes, cache fields, and M3 tiered pricing./anthropic.MINIMAX_API_KEYimport support, focused tests, README guidance, and a changeset.Principles
Checks
pnpm install --frozen-lockfile --ignore-scripts=falsepnpm --filter @open-codesign/shared testpnpm --filter @open-codesign/shared typecheckpnpm --filter @open-codesign/providers testpnpm --filter @open-codesign/providers typecheckpnpm --filter @open-codesign/desktop exec vitest run src/main/imports/codex-config.test.tspnpm --filter @open-codesign/desktop typecheckpnpm lintpnpm typecheckpnpm --filter @open-codesign/desktop exec vitest run src/main/codex-oauth-ipc.test.ts src/main/onboarding-ipc.test.ts src/main/preview-runtime.test.ts(85 passed)pnpm test(local run had 3 desktop test failures: two timeouts and one Chromium detached-frame failure; the three failing files pass when rerun together)