Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions apps/cli/src/settings/profiles/buildProfileEnvOverlay.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,13 @@ describe('buildProfileEnvOverlay with the shipped MiniMax built-in profiles', ()
expect(result.envOverlayExpanded).toMatchObject({
ANTHROPIC_BASE_URL: expectedBaseUrl,
ANTHROPIC_AUTH_TOKEN: 'mm-from-env',
// The `[1m]` suffix and the compaction window are a pair: MiniMax's Claude
// Code guide specifies both, and without them sessions compact against the
// 200K the endpoint advertises rather than M3's 1M.
ANTHROPIC_MODEL: 'MiniMax-M3[1m]',
ANTHROPIC_MODEL: 'MiniMax-M3',
CLAUDE_CODE_AUTO_COMPACT_WINDOW: '1000000',
// Claude Code resolves the opus/sonnet/haiku aliases through these keys.
// Without them a model switch would send "opus"/"sonnet" upstream, which
// MiniMax rejects.
ANTHROPIC_DEFAULT_OPUS_MODEL: 'MiniMax-M3[1m]',
ANTHROPIC_DEFAULT_SONNET_MODEL: 'MiniMax-M3[1m]',
ANTHROPIC_DEFAULT_OPUS_MODEL: 'MiniMax-M3',
ANTHROPIC_DEFAULT_SONNET_MODEL: 'MiniMax-M3',
ANTHROPIC_DEFAULT_HAIKU_MODEL: 'MiniMax-M2.7',
API_TIMEOUT_MS: '600000',
});
Expand Down
35 changes: 17 additions & 18 deletions apps/ui/sources/sync/domains/profiles/profileDocumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,24 +174,24 @@ export Z_AI_HAIKU_MODEL="GLM-4.5-Air"`,
{
name: 'MINIMAX_AUTO_COMPACT_WINDOW',
expectedValue: '1000000',
description: 'Context capacity used for auto-compaction. Required alongside the [1m] model id to get M3\'s full 1M window.',
description: 'Context capacity used for auto-compaction. Matches M3\'s 1M context window.',
isSecret: false,
},
{
name: 'MINIMAX_MODEL',
expectedValue: 'MiniMax-M3[1m]',
description: 'Default model. The [1m] suffix selects M3\'s 1M-context variant, as MiniMax\'s Claude Code guide specifies.',
expectedValue: 'MiniMax-M3',
description: 'Default model with a 1M-token context window.',
isSecret: false,
},
{
name: 'MINIMAX_OPUS_MODEL',
expectedValue: 'MiniMax-M3[1m]',
expectedValue: 'MiniMax-M3',
description: 'Model used when the session selects the Opus tier',
isSecret: false,
},
{
name: 'MINIMAX_SONNET_MODEL',
expectedValue: 'MiniMax-M3[1m]',
expectedValue: 'MiniMax-M3',
description: 'Model used when the session selects the Sonnet tier',
isSecret: false,
},
Expand All @@ -213,15 +213,14 @@ export MINIMAX_BASE_URL="https://api.minimax.io/anthropic"
export MINIMAX_AUTH_TOKEN="YOUR_MINIMAX_API_KEY"
export MINIMAX_API_TIMEOUT_MS="600000"
export MINIMAX_AUTO_COMPACT_WINDOW="1000000"
export MINIMAX_MODEL="MiniMax-M3[1m]"
export MINIMAX_OPUS_MODEL="MiniMax-M3[1m]"
export MINIMAX_SONNET_MODEL="MiniMax-M3[1m]"
export MINIMAX_MODEL="MiniMax-M3"
export MINIMAX_OPUS_MODEL="MiniMax-M3"
export MINIMAX_SONNET_MODEL="MiniMax-M3"
export MINIMAX_HAIKU_MODEL="MiniMax-M2.7"
export MINIMAX_CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"

# Model selection guide:
# - MiniMax-M3[1m]: Default. M3 with its 1M-context variant selected.
# - MiniMax-M3: Same model without the extended-context suffix (200K).
# - MiniMax-M3: Default model with a 1M-token context window.
# - MiniMax-M2.7: Faster, lighter model for background work.`,
};
case 'minimax-cn':
Expand Down Expand Up @@ -250,24 +249,24 @@ export MINIMAX_CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
{
name: 'MINIMAX_CN_AUTO_COMPACT_WINDOW',
expectedValue: '1000000',
description: 'Context capacity used for auto-compaction. Required alongside the [1m] model id to get M3\'s full 1M window.',
description: 'Context capacity used for auto-compaction. Matches M3\'s 1M context window.',
isSecret: false,
},
{
name: 'MINIMAX_CN_MODEL',
expectedValue: 'MiniMax-M3[1m]',
description: 'Default model. The [1m] suffix selects M3\'s 1M-context variant, as MiniMax\'s Claude Code guide specifies.',
expectedValue: 'MiniMax-M3',
description: 'Default model with a 1M-token context window.',
isSecret: false,
},
{
name: 'MINIMAX_CN_OPUS_MODEL',
expectedValue: 'MiniMax-M3[1m]',
expectedValue: 'MiniMax-M3',
description: 'Model used when the session selects the Opus tier',
isSecret: false,
},
{
name: 'MINIMAX_CN_SONNET_MODEL',
expectedValue: 'MiniMax-M3[1m]',
expectedValue: 'MiniMax-M3',
description: 'Model used when the session selects the Sonnet tier',
isSecret: false,
},
Expand All @@ -289,9 +288,9 @@ export MINIMAX_CN_BASE_URL="https://api.minimaxi.com/anthropic"
export MINIMAX_CN_AUTH_TOKEN="YOUR_MINIMAX_API_KEY"
export MINIMAX_CN_API_TIMEOUT_MS="600000"
export MINIMAX_CN_AUTO_COMPACT_WINDOW="1000000"
export MINIMAX_CN_MODEL="MiniMax-M3[1m]"
export MINIMAX_CN_OPUS_MODEL="MiniMax-M3[1m]"
export MINIMAX_CN_SONNET_MODEL="MiniMax-M3[1m]"
export MINIMAX_CN_MODEL="MiniMax-M3"
export MINIMAX_CN_OPUS_MODEL="MiniMax-M3"
export MINIMAX_CN_SONNET_MODEL="MiniMax-M3"
export MINIMAX_CN_HAIKU_MODEL="MiniMax-M2.7"
export MINIMAX_CN_CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"`,
};
Expand Down
16 changes: 7 additions & 9 deletions packages/protocol/src/providers/claude/builtInBackendProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,11 @@ export const CLAUDE_BUILT_IN_BACKEND_PROFILES: ReadonlyArray<AIBackendProfile> =
{ name: 'ANTHROPIC_BASE_URL', value: '${MINIMAX_BASE_URL:-https://api.minimax.io/anthropic}' },
{ name: 'ANTHROPIC_AUTH_TOKEN', value: '${MINIMAX_AUTH_TOKEN}' },
{ name: 'API_TIMEOUT_MS', value: '${MINIMAX_API_TIMEOUT_MS:-600000}' },
// MiniMax's Claude Code guide pairs the `[1m]` extended-context model id with
// an explicit compaction window; without both, sessions compact against the
// 200K the endpoint advertises by default instead of M3's 1M.
// Match Claude Code's compaction window to M3's 1M context capacity.
{ name: 'CLAUDE_CODE_AUTO_COMPACT_WINDOW', value: '${MINIMAX_AUTO_COMPACT_WINDOW:-1000000}' },
{ name: 'ANTHROPIC_MODEL', value: '${MINIMAX_MODEL:-MiniMax-M3[1m]}' },
{ name: 'ANTHROPIC_DEFAULT_OPUS_MODEL', value: '${MINIMAX_OPUS_MODEL:-MiniMax-M3[1m]}' },
{ name: 'ANTHROPIC_DEFAULT_SONNET_MODEL', value: '${MINIMAX_SONNET_MODEL:-MiniMax-M3[1m]}' },
{ name: 'ANTHROPIC_MODEL', value: '${MINIMAX_MODEL:-MiniMax-M3}' },
{ name: 'ANTHROPIC_DEFAULT_OPUS_MODEL', value: '${MINIMAX_OPUS_MODEL:-MiniMax-M3}' },
{ name: 'ANTHROPIC_DEFAULT_SONNET_MODEL', value: '${MINIMAX_SONNET_MODEL:-MiniMax-M3}' },
// MiniMax maps every tier to M3; we keep the cheaper documented M2.7 for
// Haiku-class background work, which is what that tier exists for.
{ name: 'ANTHROPIC_DEFAULT_HAIKU_MODEL', value: '${MINIMAX_HAIKU_MODEL:-MiniMax-M2.7}' },
Expand All @@ -111,9 +109,9 @@ export const CLAUDE_BUILT_IN_BACKEND_PROFILES: ReadonlyArray<AIBackendProfile> =
{ name: 'ANTHROPIC_AUTH_TOKEN', value: '${MINIMAX_CN_AUTH_TOKEN}' },
{ name: 'API_TIMEOUT_MS', value: '${MINIMAX_CN_API_TIMEOUT_MS:-600000}' },
{ name: 'CLAUDE_CODE_AUTO_COMPACT_WINDOW', value: '${MINIMAX_CN_AUTO_COMPACT_WINDOW:-1000000}' },
{ name: 'ANTHROPIC_MODEL', value: '${MINIMAX_CN_MODEL:-MiniMax-M3[1m]}' },
{ name: 'ANTHROPIC_DEFAULT_OPUS_MODEL', value: '${MINIMAX_CN_OPUS_MODEL:-MiniMax-M3[1m]}' },
{ name: 'ANTHROPIC_DEFAULT_SONNET_MODEL', value: '${MINIMAX_CN_SONNET_MODEL:-MiniMax-M3[1m]}' },
{ name: 'ANTHROPIC_MODEL', value: '${MINIMAX_CN_MODEL:-MiniMax-M3}' },
{ name: 'ANTHROPIC_DEFAULT_OPUS_MODEL', value: '${MINIMAX_CN_OPUS_MODEL:-MiniMax-M3}' },
{ name: 'ANTHROPIC_DEFAULT_SONNET_MODEL', value: '${MINIMAX_CN_SONNET_MODEL:-MiniMax-M3}' },
{ name: 'ANTHROPIC_DEFAULT_HAIKU_MODEL', value: '${MINIMAX_CN_HAIKU_MODEL:-MiniMax-M2.7}' },
{ name: 'CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC', value: '${MINIMAX_CN_CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:-1}' },
],
Expand Down
Loading