Skip to content

feat(providers): add MiniMax provider support#403

Open
octo-patch wants to merge 1 commit into
OpenCoworkAI:mainfrom
octo-patch:octo/20260708-provider-add-recvoNoATqUjZI
Open

feat(providers): add MiniMax provider support#403
octo-patch wants to merge 1 commit into
OpenCoworkAI:mainfrom
octo-patch:octo/20260708-provider-add-recvoNoATqUjZI

Conversation

@octo-patch

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

Copy link
Copy Markdown

Reason: add target provider/model to existing provider registry.

Summary

  • Add MiniMax as a built-in provider using the existing static model-hint architecture.
  • Register MiniMax-M3 and MiniMax-M2.7 with defaults, context windows, modalities, thinking modes, cache fields, and M3 tiered pricing.
  • Document both configured regional OpenAI-compatible and Anthropic-compatible endpoint bases, with Anthropic bases ending in /anthropic.
  • Add connection validation, Codex MINIMAX_API_KEY import support, focused tests, README guidance, and a changeset.

Principles

  • Compatibility: green. Uses the existing provider registry, OpenAI-compatible adapter path, and Anthropic-compatible base handling.
  • Upgradeability: green. Keeps the provider and model data centralized in shared configuration and includes a changeset.
  • No bloat: green. Adds no dependencies and keeps the implementation within existing provider, validation, import, test, and documentation surfaces.
  • Elegance: green. Reuses the existing static-hint and built-in-provider conventions without introducing a new abstraction.

Checks

  • pnpm install --frozen-lockfile --ignore-scripts=false
  • pnpm --filter @open-codesign/shared test
  • pnpm --filter @open-codesign/shared typecheck
  • pnpm --filter @open-codesign/providers test
  • pnpm --filter @open-codesign/providers typecheck
  • pnpm --filter @open-codesign/desktop exec vitest run src/main/imports/codex-config.test.ts
  • pnpm --filter @open-codesign/desktop typecheck
  • pnpm lint
  • pnpm typecheck
  • pnpm --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)

@github-actions github-actions Bot added docs Documentation area:desktop apps/desktop (Electron shell, renderer) area:providers packages/providers (pi-ai adapter, model calls) labels Jul 15, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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] Test description in migrateLegacyToV3 test 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 added minimax provider, 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:64 applies normalizeValidateBaseUrl which strips /v1, then appends /v1/models. If a user configures an Anthropic-compatible base (e.g. https://api.minimax.io/anthropic), the validation URL becomes https://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.ts verify MiniMax model registration, endpoints, and catalog.
  • New test in packages/providers/src/validate.test.ts verifies MiniMax validation endpoint and Bearer auth.
  • Updated test in apps/desktop/src/main/imports/codex-config.test.ts verifies MINIMAX_API_KEY acceptance.

Open-CoDesign Bot

Signed-off-by: octo-patch <266937838+octo-patch@users.noreply.github.com>
@octo-patch
octo-patch force-pushed the octo/20260708-provider-add-recvoNoATqUjZI branch from 13253b1 to 4c212a0 Compare July 15, 2026 07:45

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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] Test description in migrateLegacyToV3 test 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. If minimax should be verified, update the test body.

  • [Minor] The MiniMax validation endpoint in packages/providers/src/validate.ts:64 calls normalizeValidateBaseUrl which strips /v1, then appends /v1/models. For a user who configures an Anthropic-compatible base like https://api.minimax.io/anthropic, the validation URL becomes https://api.minimax.io/anthropic/v1/models which 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 migrateLegacyToV3 test description discrepancy persists.

Open-CoDesign Bot

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

Labels

area:desktop apps/desktop (Electron shell, renderer) area:providers packages/providers (pi-ai adapter, model calls) docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant