From 6b491d52be2b3a829c5fe98b3f873df1df1c9cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Tue, 25 Aug 2026 10:49:53 -0400 Subject: [PATCH] Add MiniMax as an Anthropic-compatible AI provider MiniMax-M3[1m] via api.minimaxi.com/anthropic per the official Claude Code token-plan docs; the claude-code combo enters the compatibility matrix as stable with mock regression coverage, including the Haiku-slot fallback to the single model. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp --- cn/registry/ai-compatibility.json | 7 +- cn/registry/ai-providers.json | 130 +++++++++++++++++++++++++++--- test/shell.d/omarchycn-ai-test.sh | 7 +- 3 files changed, 129 insertions(+), 15 deletions(-) diff --git a/cn/registry/ai-compatibility.json b/cn/registry/ai-compatibility.json index 8ff46116..30482104 100644 --- a/cn/registry/ai-compatibility.json +++ b/cn/registry/ai-compatibility.json @@ -1,5 +1,5 @@ { - "_verified": "2026-08-24. level=stable: adapter 渲染由 test/shell.d/omarchycn-ai-test.sh mock 回归覆盖; level=official-doc: 官方集成文档存在,native CLI 自管配置", + "_verified": "2026-08-25. level=stable: adapter 渲染由 test/shell.d/omarchycn-ai-test.sh mock 回归覆盖; level=official-doc: 官方集成文档存在,native CLI 自管配置", "combos": { "claude-code": { "deepseek": { @@ -16,6 +16,11 @@ "level": "stable", "doc": "https://docs.z.ai/devpack/tool/claude", "adapter": true + }, + "minimax": { + "level": "stable", + "doc": "https://platform.minimax.io/docs/token-plan/claude-code", + "adapter": true } }, "codex": { diff --git a/cn/registry/ai-providers.json b/cn/registry/ai-providers.json index f23ef591..b14dd112 100644 --- a/cn/registry/ai-providers.json +++ b/cn/registry/ai-providers.json @@ -1,44 +1,150 @@ { - "_verified": "2026-08-24, from official docs (see OmarchyCN PRD §27)", + "_verified": "2026-08-25, from official docs (see OmarchyCN PRD §27; minimax: platform.minimax.io/docs/token-plan/claude-code)", "providers": { "deepseek": { "display_name": "DeepSeek", - "auth": ["api_key"], + "auth": [ + "api_key" + ], "key_url": "https://platform.deepseek.com/api_keys", "endpoints": { "anthropic": "https://api.deepseek.com/anthropic", "openai": "https://api.deepseek.com" }, "models": [ - { "id": "deepseek-v4-pro[1m]", "aliases": ["default-coding"], "capabilities": ["tools", "streaming", "reasoning"] }, - { "id": "deepseek-v4-flash", "aliases": ["fast"], "capabilities": ["tools", "streaming"] } + { + "id": "deepseek-v4-pro[1m]", + "aliases": [ + "default-coding" + ], + "capabilities": [ + "tools", + "streaming", + "reasoning" + ] + }, + { + "id": "deepseek-v4-flash", + "aliases": [ + "fast" + ], + "capabilities": [ + "tools", + "streaming" + ] + } ] }, "kimi": { "display_name": "Kimi (Moonshot)", - "auth": ["api_key"], + "auth": [ + "api_key" + ], "key_url": "https://www.kimi.com/code", "endpoints": { "anthropic": "https://api.kimi.com/coding/", "openai": "https://api.moonshot.cn/v1" }, "models": [ - { "id": "kimi-for-coding", "aliases": ["default-coding"], "capabilities": ["tools", "streaming", "reasoning"] }, - { "id": "kimi-for-coding-highspeed", "aliases": ["fast"], "capabilities": ["tools", "streaming"] }, - { "id": "kimi-k2.6", "aliases": ["general"], "capabilities": ["tools", "streaming"], "protocol": "openai" } + { + "id": "kimi-for-coding", + "aliases": [ + "default-coding" + ], + "capabilities": [ + "tools", + "streaming", + "reasoning" + ] + }, + { + "id": "kimi-for-coding-highspeed", + "aliases": [ + "fast" + ], + "capabilities": [ + "tools", + "streaming" + ] + }, + { + "id": "kimi-k2.6", + "aliases": [ + "general" + ], + "capabilities": [ + "tools", + "streaming" + ], + "protocol": "openai" + } ] }, "zai": { "display_name": "Z.AI / GLM", - "auth": ["api_key"], + "auth": [ + "api_key" + ], "key_url": "https://z.ai/manage-apikey/apikey-list", "endpoints": { "anthropic": "https://api.z.ai/api/anthropic" }, "models": [ - { "id": "glm-5.2[1m]", "aliases": ["default-coding"], "capabilities": ["tools", "streaming", "reasoning"] }, - { "id": "GLM-5.3", "aliases": ["latest"], "capabilities": ["tools", "streaming", "reasoning"] }, - { "id": "GLM-4.7", "aliases": ["fast"], "capabilities": ["tools", "streaming"] } + { + "id": "glm-5.2[1m]", + "aliases": [ + "default-coding" + ], + "capabilities": [ + "tools", + "streaming", + "reasoning" + ] + }, + { + "id": "GLM-5.3", + "aliases": [ + "latest" + ], + "capabilities": [ + "tools", + "streaming", + "reasoning" + ] + }, + { + "id": "GLM-4.7", + "aliases": [ + "fast" + ], + "capabilities": [ + "tools", + "streaming" + ] + } + ] + }, + "minimax": { + "display_name": "MiniMax", + "auth": [ + "api_key" + ], + "key_url": "https://platform.minimaxi.com/user-center/payment/token-plan", + "endpoints": { + "anthropic": "https://api.minimaxi.com/anthropic" + }, + "models": [ + { + "id": "MiniMax-M3[1m]", + "aliases": [ + "default-coding" + ], + "capabilities": [ + "tools", + "streaming", + "reasoning" + ] + } ] } } diff --git a/test/shell.d/omarchycn-ai-test.sh b/test/shell.d/omarchycn-ai-test.sh index 2fd1c60d..5576409e 100755 --- a/test/shell.d/omarchycn-ai-test.sh +++ b/test/shell.d/omarchycn-ai-test.sh @@ -34,7 +34,7 @@ export PATH="$TEST_HOME/stubs:$PATH" for reg in ai-providers ai-harnesses ai-compatibility; do jq -e . "$ROOT/cn/registry/$reg.json" > /dev/null || fail "$reg.json parses" done -for p in deepseek kimi zai; do +for p in deepseek kimi zai minimax; do jq -e --arg p "$p" '.providers[$p].endpoints.anthropic // .providers[$p].endpoints.openai' \ "$ROOT/cn/registry/ai-providers.json" > /dev/null || fail "provider $p has an endpoint" done @@ -67,13 +67,16 @@ declare -A bases=( [deepseek]="https://api.deepseek.com/anthropic" [kimi]="https://api.kimi.com/coding/" [zai]="https://api.z.ai/api/anthropic" + [minimax]="https://api.minimaxi.com/anthropic" ) -for p in deepseek kimi zai; do +for p in deepseek kimi zai minimax; do out=$(cn_ai_render_env claude-code "$p" test-model sk-x) grep -qF "ANTHROPIC_BASE_URL=${bases[$p]}" <<<"$out" || fail "claude-code $p base url" "$out" grep -q "ANTHROPIC_AUTH_TOKEN=sk-x" <<<"$out" || fail "claude-code $p auth token" grep -q "ANTHROPIC_API_KEY=sk-x" <<<"$out" || fail "claude-code $p api key" done +out=$(cn_ai_render_env claude-code minimax "MiniMax-M3[1m]" sk-x) +grep -qF "ANTHROPIC_DEFAULT_HAIKU_MODEL=MiniMax-M3" <<<"$out" || fail "minimax haiku slot falls back to default-coding" out=$(cn_ai_render_env opencode deepseek test-model sk-x) grep -q "DEEPSEEK_API_KEY=sk-x" <<<"$out" || fail "opencode deepseek env" if cn_ai_render_env opencode zai m k > /dev/null 2>&1; then