Skip to content

feat: add MiniMax as a built-in onboarding provider#270

Open
octo-patch wants to merge 1 commit intoOpenCoworkAI:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as a built-in onboarding provider#270
octo-patch wants to merge 1 commit intoOpenCoworkAI:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

  • Add minimax to SUPPORTED_ONBOARDING_PROVIDERS and BUILTIN_PROVIDERS with wire: 'openai-chat' and baseUrl: 'https://api.minimax.io/v1'
  • Ship MiniMax-M2.7 and MiniMax-M2.7-highspeed as static model hints (no /models endpoint call needed)
  • Support MINIMAX_API_KEY env var via the envKey field — works for Codex import and env-fallback resolution
  • Add MINIMAX_API_KEY to ALLOWED_IMPORT_ENV_KEYS allowlist in codex-config
  • Add pingProvider case for minimax in validate.ts (Bearer auth, https://api.minimax.io/v1/models)
  • Add unit tests for MiniMax config properties and validation behavior
  • Add changeset (minor bump for @open-codesign/shared)

Why

MiniMax offers an OpenAI-compatible API (https://api.minimax.io/v1) with competitive models (MiniMax-M2.7). Adding it as a built-in provider lets users select it directly from the onboarding screen without needing to configure a custom endpoint manually.

API reference

Test plan

  • All tests in packages/shared pass (pnpm --filter @open-codesign/shared test — 202 tests)
  • All tests in packages/providers pass (pnpm --filter @open-codesign/providers test — 235 tests)
  • All tests in apps/desktop onboarding-ipc pass (32 tests)
  • Typecheck passes for packages/shared and packages/providers
  • Biome lint passes on changed files
  • Changeset included for user-visible change

- Add 'minimax' to SUPPORTED_ONBOARDING_PROVIDERS and BUILTIN_PROVIDERS
  with wire: 'openai-chat', baseUrl: 'https://api.minimax.io/v1'
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to static model hint
- Support MINIMAX_API_KEY env var via envKey field
- Add MINIMAX_API_KEY to ALLOWED_IMPORT_ENV_KEYS allowlist
- Add pingProvider support for minimax in validate.ts
- Add unit tests for MiniMax provider config and validation
- Add changeset for the new provider

API reference:
- Chat (OpenAI Compatible): https://platform.minimax.io/docs/api-reference/text-openai-api
@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 May 2, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

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] onboarding-ipc.ts error message missing ollama from the list of supported providers — the message now reads "Only anthropic, openai, openrouter, minimax" but the corresponding message in packages/providers/src/validate.ts includes ollama as well. For consistency, the error message in onboarding-ipc.ts should also mention ollama. This is a pre-existing inconsistency, but the PR touched that line.
    Suggested fix:

    - `Provider "${provider}" is not supported in v0.1. Only anthropic, openai, openrouter, minimax.`
    + `Provider "${provider}" is not supported in v0.1. Only anthropic, openai, openrouter, ollama, minimax.`
  • [Nit] Test description change from "seeds three builtin providers" to "seeds all builtin providers" is accurate but the test body only checks that all entries exist, not the count. Consider also adding an assertion on the number of seeded providers to future-proof the test.
    Suggested fix (optional):

    const providerCount = SUPPORTED_ONBOARDING_PROVIDERS.length;
    expect(Object.keys(v3.providers).length).toBe(providerCount);

Questions

  • Does the frontend onboarding UI automatically pick up the new provider from SUPPORTED_ONBOARDING_PROVIDERS and PROVIDER_SHORTLIST, or is there a hardcoded list in the renderer that should be updated? The diff only touches shared config and IPC logic; if there's a renderer-side static list, it would remain unaware of MiniMax.

Summary
The PR correctly adds MiniMax as a built-in onboarding provider with OpenAI-compatible wire, static model hints, environment variable support, and validation. The changes are focused, well-tested, and consistent with the project's architecture. No blockers or major issues found. See minor consistency improvement above.

Testing

  • Unit tests added in packages/providers/src/validate.test.ts and packages/shared/src/config.test.ts cover the new provider's configuration properties, validation, and error behavior. Tests are adequate.
  • No E2E tests impacted (no UI changes).

Open-CoDesign Bot

@hqhq1025
Copy link
Copy Markdown
Collaborator

hqhq1025 commented May 2, 2026

Thanks, this is close. The core provider wiring looks good, and I verified the focused tests locally. Before merging, could you please address a few small integration issues?

  1. Please add a real MiniMax entry to the Settings “Add provider” menu. Right now MiniMax is registered in shared/provider config, but users still cannot choose it directly from the UI; they can only use Custom Provider or Codex import. Since this PR describes MiniMax as a first-class onboarding provider, the UI should expose it.

  2. Please update the MiniMax capability profile. The PR sets supportsModelsEndpoint: false, but the new validation code calls https://api.minimax.io/v1/models, and MiniMax documents an OpenAI-compatible List Models endpoint. I think this should be true or omitted, while keeping modelsHint / static-hint if we still want a stable default model list.

  3. Please include ollama in the unsupported-provider error message in apps/desktop/src/main/onboarding-ipc.ts. The current message says anthropic, openai, openrouter, minimax, but the actual supported list also includes ollama.

I verified locally:

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 test -- src/main/onboarding-ipc.test.ts src/main/provider-settings.test.ts src/main/connection-ipc.test.ts
pnpm --filter @open-codesign/desktop typecheck
pnpm exec biome check .changeset/add-minimax-provider.md apps/desktop/src/main/imports/codex-config.ts apps/desktop/src/main/onboarding-ipc.ts packages/providers/src/validate.ts packages/providers/src/validate.test.ts packages/shared/src/config.ts packages/shared/src/config.test.ts

Once those are addressed, this should be good to merge.

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.

2 participants