feat: add MiniMax provider support#686
Conversation
- Add MiniMax chat model provider using OpenAI-compatible interface - Register 'minimax' in the provider enum (src/db/tables.ts) - Add createModel case for MiniMax in src/ai/fetch.ts (base URL: https://api.minimax.io/v1) - Add MiniMax to the provider selector in the new model form - Add MiniMax to the provider enum in the model detail form - Supports MiniMax-M2.7 and MiniMax-M2.7-highspeed models - Requires MINIMAX_API_KEY (stored per-model as apiKey) - Add unit tests for provider schema validation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Reviewed by Cursor Bugbot for commit da72a19. Configure here.
| <SelectItem value="thunderbolt">Thunderbolt</SelectItem> | ||
| <SelectItem value="openai">OpenAI</SelectItem> | ||
| <SelectItem value="openrouter">OpenRouter</SelectItem> | ||
| <SelectItem value="minimax">MiniMax</SelectItem> |
There was a problem hiding this comment.
MiniMax UI added to unreachable component, not active page
High Severity
The MiniMax provider dropdown and schema changes are added to NewModelPage in new.tsx and ModelDetailPage in detail.tsx, but neither component is connected to any route. The only models page wired into the app router (src/app.tsx line 161) is ModelsPage from src/settings/models/index.tsx, which has its own form schema, provider dropdown, getProviderDisplay, and fetchAvailableModels — none of which include minimax. Users will be unable to select MiniMax as a provider through the UI.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit da72a19. Configure here.
| return data.apiKey !== undefined && data.apiKey.length > 0 | ||
| }, | ||
| { message: 'API Key is required for this provider', path: ['apiKey'] }, | ||
| ) |
There was a problem hiding this comment.
Tests validate duplicated schemas, not production code
Medium Severity
The test file defines local copies of the form schemas from new.tsx and detail.tsx rather than importing or testing the actual production code. These duplicated schemas will silently drift if the source schemas change, giving false confidence in test coverage. Additionally, the file is named fetch.test.ts but tests no function from src/ai/fetch.ts (like createModel).
Reviewed by Cursor Bugbot for commit da72a19. Configure here.


Summary
'minimax'in the provider enum insrc/db/tables.tscreateModelcase for MiniMax insrc/ai/fetch.tswith base URLhttps://api.minimax.io/v1src/settings/models/new.tsx)src/settings/models/detail.tsx)Usage
MiniMax-M2.7orMiniMax-M2.7-highspeedSupported Models
MiniMax-M2.7MiniMax-M2.7-highspeedAPI Reference
Test plan
Note
Medium Risk
Introduces a new external LLM provider path and persists a new
providerenum value, which could break model creation/selection or cause runtime errors if misconfigured. Changes are localized and reuse the existing OpenAI-compatible integration pattern.Overview
Adds MiniMax as a first-class model provider across the stack: the models DB
providerenum now includesminimax, the Settings → Models UI allows selecting it (new + detail forms), and the backend model factory (createModel) can instantiate it viacreateOpenAICompatibletargetinghttps://api.minimax.io/v1(API key required).Also adds a focused Bun test (
src/ai/fetch.test.ts) covering form-schema validation expectations for MiniMax (requires API key, does not require URL).Reviewed by Cursor Bugbot for commit da72a19. Bugbot is set up for automated code reviews on this repo. Configure here.