豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

feat: add MiniMax provider support#686

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

feat: add MiniMax provider support#686
octo-patch wants to merge 1 commit intothunderbird:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

@octo-patch octo-patch commented Apr 18, 2026

Summary

  • Add MiniMax as a selectable AI provider using the OpenAI-compatible API interface
  • Register 'minimax' in the provider enum in src/db/tables.ts
  • Add createModel case for MiniMax in src/ai/fetch.ts with base URL https://api.minimax.io/v1
  • Add MiniMax to the provider dropdown in the new model form (src/settings/models/new.tsx)
  • Add MiniMax to the provider enum in the model detail edit form (src/settings/models/detail.tsx)

Usage

  1. Go to Settings → Models → Add Model
  2. Select MiniMax as the provider
  3. Enter model name: MiniMax-M2.7 or MiniMax-M2.7-highspeed
  4. Enter your MiniMax API key (from https://platform.minimax.io)
  5. Click Add Model

Supported Models

Model Description
MiniMax-M2.7 Peak Performance. Ultimate Value. Master the Complex
MiniMax-M2.7-highspeed Same performance, faster and more agile

API Reference

Test plan

  • Unit tests for form schema validation (MiniMax requires API key, does not require URL)
  • Full test suite passes (2036 pass, 1 pre-existing skip unrelated to this PR)
  • TypeScript type check passes (only pre-existing error in encryption.test.ts unrelated to this PR)

Note

Medium Risk
Introduces a new external LLM provider path and persists a new provider enum 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 provider enum now includes minimax, the Settings → Models UI allows selecting it (new + detail forms), and the backend model factory (createModel) can instantiate it via createOpenAICompatible targeting https://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.

- 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
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

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>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit da72a19. Configure here.

Comment thread src/ai/fetch.test.ts
return data.apiKey !== undefined && data.apiKey.length > 0
},
{ message: 'API Key is required for this provider', path: ['apiKey'] },
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit da72a19. Configure here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant