Skip to content

feat(config): default MiniMax presets to M3.1 Flash - #421

Open
octo-patch wants to merge 1 commit into
UfoMiao:mainfrom
octo-patch:octo/minimax-m31-flash-defaults
Open

octo-patch wants to merge 1 commit into
UfoMiao:mainfrom
octo-patch:octo/minimax-m31-flash-defaults

Conversation

@octo-patch

@octo-patch octo-patch commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Reason: New MiniMax configurations still select M3/M2.7, and the China preset uses the previous regional hostname. This refresh makes MiniMax-M3.1-Flash the default while preserving explicit model and endpoint overrides.

Description

  • Use MiniMax-M3.1-Flash as the global/China default for Claude Code and Codex, with MiniMax-M3 as the secondary Claude Code model.
  • Use the currently documented api.minimax.cn China endpoints for Anthropic and Responses APIs.
  • Keep explicit M3, legacy, custom model and URL choices intact; no saved-profile migration is introduced.
  • Update provider documentation and test profile serialization, Claude Code settings JSON, and Codex TOML output, including preservation of unrelated MCP configuration.

Official contracts: global Responses, China Responses, China Anthropic.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • Tests added/updated
  • All tests pass
  • Coverage maintained

Using repository-pinned pnpm 10.17.1 and a frozen lockfile:

  • Targeted Vitest run: 173 tests passed across 6 files, with at most 2 workers. Covers presets, profile serialization, Claude Code settings output, Codex TOML output, init provider integration, and provider management.
  • pnpm lint: passed.
  • pnpm typecheck: passed.
  • git diff --check: passed.
  • CI at 1ba0726c564607e391a77c25fb8ddd1ea1b6b8ae: lint/typecheck and build/test:coverage steps passed on Linux, Windows, and macOS. The queued local build was canceled before starting after CI provided this validation.

The full suite and coverage thresholds were validated in CI, not repeated locally. The passing init-provider tests print warnings about a missing mkdirSync export in their filesystem mock. ZCF generates configuration for external clients; it does not implement the inference SDK/HTTP boundary. Tool calls, thinking-history replay, streaming, and image payloads are therefore not wire-tested by this change. No paid inference was performed.

Checklist

  • Code follows style guidelines
  • Self-review completed
  • Documentation updated
  • No new warnings introduced

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Default MiniMax presets to M3.1 Flash and refresh China endpoints

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Default new MiniMax Claude Code and Codex configurations to M3.1 Flash.
• Switch China presets to api.minimax.cn while preserving explicit model and URL overrides.
• Document the defaults and test generated profiles, settings JSON, and Codex TOML.
Diagram

graph TD
  P["MiniMax presets"] --> C["Claude profile"] --> J["Settings JSON"]
  P --> X["Codex profile"] --> T["Config TOML"]
Loading
High-Level Assessment

Changing the shared presets is the appropriate approach: existing profile creation already applies defaults only when callers omit model or URL choices. A saved-profile migration would unnecessarily change explicit configurations.

Files changed (10) +154 / -28

Enhancement (1) +6 / -6
api-providers.tsSet Flash defaults and update MiniMax China endpoints +6/-6

Set Flash defaults and update MiniMax China endpoints

• Sets M3.1 Flash as the default model for both clients in both MiniMax presets, with M3 as Claude Code’s secondary model. Changes the China Anthropic and Responses base URLs to api.minimax.cn.

src/config/api-providers.ts

Tests (4) +121 / -6
minimax-codex-config.test.tsTest generated MiniMax Codex TOML +44/-0

Test generated MiniMax Codex TOML

• Adds global and China output tests for the Flash default, explicit legacy and custom models, URL overrides, Responses protocol, and preservation of existing MCP settings.

tests/unit/code-tools/minimax-codex-config.test.ts

provider-profiles.test.tsTest MiniMax profile defaults and overrides +45/-0

Test MiniMax profile defaults and overrides

• Checks serialized Claude Code and Codex profiles for both regions. Verifies that explicitly supplied models and endpoints take precedence over preset values.

tests/unit/code-tools/provider-profiles.test.ts

api-providers.test.tsUpdate MiniMax preset assertions +6/-6

Update MiniMax preset assertions

• Asserts the new default model ordering and China base URLs while retaining authentication and protocol checks.

tests/unit/config/api-providers.test.ts

claude-code-config-manager.test.tsTest MiniMax Claude Code settings output +26/-0

Test MiniMax Claude Code settings output

• Checks that both regional profiles write Flash, M3 in the Haiku role, and the expected endpoint to settings JSON. Also checks that applying an explicit legacy model and custom URL writes those values.

tests/unit/utils/claude-code-config-manager.test.ts

Documentation (5) +27 / -16
api-providers.mdDocument MiniMax Flash defaults and regional endpoints +7/-6

Document MiniMax Flash defaults and regional endpoints

• Updates global and China model and endpoint guidance for Claude Code and Codex. Clarifies that explicit overrides remain intact and that clients handle inference behavior.

docs/en/advanced/api-providers.md

troubleshooting.mdCorrect the MiniMax China troubleshooting URL +1/-1

Correct the MiniMax China troubleshooting URL

• Replaces the previous China Anthropic hostname with api.minimax.cn in the endpoint-check example.

docs/en/advanced/troubleshooting.md

api-providers.mdRefresh Japanese MiniMax provider guidance +9/-4

Refresh Japanese MiniMax provider guidance

• Documents Flash defaults, both client APIs, China endpoints, override preservation, and the Flash thinking requirement.

docs/ja-JP/advanced/api-providers.md

api-providers.mdRefresh Chinese MiniMax provider guidance +9/-4

Refresh Chinese MiniMax provider guidance

• Documents Flash defaults, both client APIs, China endpoints, override preservation, and the Flash thinking requirement.

docs/zh-CN/advanced/api-providers.md

troubleshooting.mdCorrect the Chinese MiniMax troubleshooting URL +1/-1

Correct the Chinese MiniMax troubleshooting URL

• Updates the China Anthropic endpoint-check example to api.minimax.cn.

docs/zh-CN/advanced/troubleshooting.md

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Action required

1. Chinese provider guide breaks language rule 📘 Rule violation ⚙ Maintainability
Description
The modified Chinese and Japanese provider guides add non-English Markdown, and the Chinese
troubleshooting guide changes an inline endpoint comment to Chinese, all outside the README_zh-CN
exception. Future contributors must maintain provider guidance in unsupported documentation
languages, while developers reading the troubleshooting guide must interpret an endpoint note
unavailable in English.
Code

docs/zh-CN/advanced/api-providers.md[R153-165]

+- 🎯 MiniMax-M3.1-Flash(默认)和 MiniMax-M3
+- 💡 两个模型均支持 1,000,000 tokens 上下文窗口
+- 🔧 Claude Code 使用 Anthropic API,Codex 使用 Responses API

**配置信息**:
- **Claude Code Base URL**: `https://api.minimax.io/anthropic`
+- **Codex Base URL**: `https://api.minimax.io/v1`
+- **中国区(`minimax-cn`)**: `https://api.minimax.cn/anthropic` / `https://api.minimax.cn/v1`
- **认证方式**: `auth_token`
-- **Claude Code 默认模型**: `MiniMax-M3`(主力)、`MiniMax-M2.7-highspeed`(高速)
+- **Claude Code 默认模型**: `MiniMax-M3.1-Flash`(主力)、`MiniMax-M3`(Haiku 角色)
+- **Codex 默认模型**: `MiniMax-M3.1-Flash`
+
+显式指定的模型和 URL(包括已保存的旧模型配置)保持不变。ZCF 生成客户端配置,thinking 历史、工具调用和图片请求由客户端处理。Flash 不支持禁用 thinking 或 `none` effort。
Evidence
The added Chinese Markdown in docs/zh-CN/advanced/api-providers.md[153-165] and Japanese Markdown in
docs/ja-JP/advanced/api-providers.md[153-165] are outside the README_zh-CN exception. The changed
Chinese inline comment in docs/zh-CN/advanced/troubleshooting.md[158-158] is also outside that
exception and leaves the endpoint note untranslated.

CLAUDE.md: Write Code Comments and Documentation in English
docs/zh-CN/advanced/api-providers.md[153-165]
docs/ja-JP/advanced/api-providers.md[153-165]
docs/zh-CN/advanced/troubleshooting.md[158-158]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The modified Chinese and Japanese provider guides contain new non-English Markdown, and the troubleshooting guide contains a Chinese inline endpoint comment. These changes are outside README_zh-CN, the stated exception to the repository's English documentation requirement.

## Fix Focus Areas
- docs/zh-CN/advanced/api-providers.md[153-165]
- docs/ja-JP/advanced/api-providers.md[153-165]
- docs/zh-CN/advanced/troubleshooting.md[158-158]

## Recommended Fix
Replace the newly added Chinese and Japanese provider documentation with English text, or move the localized content to an explicitly supported localization workflow rather than modifying these Markdown guides directly. Replace the changed Chinese endpoint comment with an English comment that identifies the MiniMax China endpoint.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: Auto: ⚖️ Balanced: Behavioral provider defaults and endpoint changes span multiple configuration paths.

Grey Divider

Tip of the day
💡 Did you know, you can open the rule or relationship behind a finding in one click

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +153 to +165
- 🎯 MiniMax-M3.1-Flash(默认)和 MiniMax-M3
- 💡 两个模型均支持 1,000,000 tokens 上下文窗口
- 🔧 Claude Code 使用 Anthropic API,Codex 使用 Responses API

**配置信息**:
- **Claude Code Base URL**: `https://api.minimax.io/anthropic`
- **Codex Base URL**: `https://api.minimax.io/v1`
- **中国区(`minimax-cn`)**: `https://api.minimax.cn/anthropic` / `https://api.minimax.cn/v1`
- **认证方式**: `auth_token`
- **Claude Code 默认模型**: `MiniMax-M3`(主力)、`MiniMax-M2.7-highspeed`(高速)
- **Claude Code 默认模型**: `MiniMax-M3.1-Flash`(主力)、`MiniMax-M3`(Haiku 角色)
- **Codex 默认模型**: `MiniMax-M3.1-Flash`

显式指定的模型和 URL(包括已保存的旧模型配置)保持不变。ZCF 生成客户端配置,thinking 历史、工具调用和图片请求由客户端处理。Flash 不支持禁用 thinking 或 `none` effort。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Chinese provider guide breaks language rule 📘 Rule violation ⚙ Maintainability

The modified Chinese and Japanese provider guides add non-English Markdown, and the Chinese
troubleshooting guide changes an inline endpoint comment to Chinese, all outside the README_zh-CN
exception. Future contributors must maintain provider guidance in unsupported documentation
languages, while developers reading the troubleshooting guide must interpret an endpoint note
unavailable in English.
Agent Prompt
## Issue description
The modified Chinese and Japanese provider guides contain new non-English Markdown, and the troubleshooting guide contains a Chinese inline endpoint comment. These changes are outside README_zh-CN, the stated exception to the repository's English documentation requirement.

## Fix Focus Areas
- docs/zh-CN/advanced/api-providers.md[153-165]
- docs/ja-JP/advanced/api-providers.md[153-165]
- docs/zh-CN/advanced/troubleshooting.md[158-158]

## Recommended Fix
Replace the newly added Chinese and Japanese provider documentation with English text, or move the localized content to an explicitly supported localization workflow rather than modifying these Markdown guides directly. Replace the changed Chinese endpoint comment with an English comment that identifies the MiniMax China endpoint.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

This branch has not been deployed

No deployments
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