feat: add MiniMax as a built-in onboarding provider#270
feat: add MiniMax as a built-in onboarding provider#270octo-patch wants to merge 1 commit intoOpenCoworkAI:mainfrom
Conversation
- 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
There was a problem hiding this comment.
Review mode: initial
Findings
-
[Minor]
onboarding-ipc.tserror message missingollamafrom the list of supported providers — the message now reads "Only anthropic, openai, openrouter, minimax" but the corresponding message inpackages/providers/src/validate.tsincludesollamaas well. For consistency, the error message inonboarding-ipc.tsshould also mentionollama. 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_PROVIDERSandPROVIDER_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.tsandpackages/shared/src/config.test.tscover the new provider's configuration properties, validation, and error behavior. Tests are adequate. - No E2E tests impacted (no UI changes).
Open-CoDesign Bot
|
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?
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.tsOnce those are addressed, this should be good to merge. |
Summary
minimaxtoSUPPORTED_ONBOARDING_PROVIDERSandBUILTIN_PROVIDERSwithwire: 'openai-chat'andbaseUrl: 'https://api.minimax.io/v1'MiniMax-M2.7andMiniMax-M2.7-highspeedas static model hints (no/modelsendpoint call needed)MINIMAX_API_KEYenv var via theenvKeyfield — works for Codex import and env-fallback resolutionMINIMAX_API_KEYtoALLOWED_IMPORT_ENV_KEYSallowlist in codex-configpingProvidercase forminimaxin validate.ts (Bearer auth,https://api.minimax.io/v1/models)minorbump 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
packages/sharedpass (pnpm --filter @open-codesign/shared test— 202 tests)packages/providerspass (pnpm --filter @open-codesign/providers test— 235 tests)apps/desktoponboarding-ipc pass (32 tests)packages/sharedandpackages/providers