#How do I update the MiniMax API key and set MiniMax M2.7 as the primary model for all agents in open

1 messages · Page 1 of 1 (latest)

burnt cypress
#

I'm on OpenClaw 2026.4.5. I need to: (1) update my MiniMax API key, (2) set MiniMax M2.7 as primary model for all agents. Can you show me the exact config structure for providers/models in openclaw.json for this version? Show me the full relevant sections with correct key names.

dense heronBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

burnt lavaBOT
#

Yep — for OpenClaw 2026.4.5, this is the correct openclaw.json structure for:

  1. updating MiniMax API key, and
  2. setting MiniMax M2.7 as primary for all agents.
{
env: {
// 1) Put your new key here
MINIMAX_API_KEY: "sk-REPLACE_WITH_NEW_KEY",
},

agents: {
defaults: {
// 2) Primary model for all agents (unless an agent overrides model)
model: {
#
primary: "minimax/MiniMax-M2.7",
},

// Optional but recommended: keep MiniMax models in your model allowlist/aliases
models: {
"minimax/MiniMax-M2.7": { alias: "minimax" },
"minimax/MiniMax-M2.7-highspeed": { alias: "minimax-fast" },
},
},

// If any agents.list[].model exists, that agent overrides defaults.
// Remove per-agent overrides if you want ALL agents on MiniMax-M2.7.
},

models: {
#
mode: "merge",
providers: {
minimax: {
baseUrl: "https://api.minimax.io/anthropic",
apiKey: "${MINIMAX_API_KEY}",
api: "anthropic-messages",
models: [
{
id: "MiniMax-M2.7",
name: "MiniMax M2.7",
reasoning: true,
input: ["text", "image"],
cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0.375 },
contextWindow: 204800,
maxTokens: 131072,
#
},
{
id: "MiniMax-M2.7-highspeed",
name: "MiniMax M2.7 Highspeed",
reasoning: true,
input: ["text", "image"],
cost: { input: 0.6, output: 2.4, cacheRead: 0.06, cacheWrite: 0.375 },
contextWindow: 204800,
maxTokens: 131072,
},
],
},
},
},
}
burnt cypress
#

I updated agents.defaults.model.primary to minimax/MiniMax-M2.7 and removed all per-agent model overrides in agents.list, but my agents are still responding with DeepSeek. The model-picker-preferences.json in the discord folder may also be overriding this. How do I force all channels (Telegram and Discord) to use MiniMax M2.7? What takes priority — agents.defaults, per-agent config, or model-picker-preferences.json?

burnt lavaBOT
#

You’re on the right track — this is almost certainly a persisted session override, not agents.defaults.

Priority order (effective model resolution)

For normal chat runs, the practical precedence is:

  1. Session model override (stored in session state, usually from /model or picker submit)
  2. channels.modelByChannel (only if no session override)
  3. Per-agent model (agents.list[].model, for the routed agent)
  4. Global default (agents.defaults.model.primary)

And importantly:

  • discord/model-picker-preferences.json is recents/history for picker UX only (quick models), not the active model source.

#

Why you still see DeepSeek

Existing Discord/Telegram sessions likely still have modelOverride/providerOverride persisted (DeepSeek), so they keep winning over your new defaults.


How to force MiniMax M2.7 everywhere

  1. Keep global default set:
  • agents.defaults.model.primary = "minimax/MiniMax-M2.7"
  1. Make sure routed agents don’t override:
  • no agents.list[].model for those agents
  1. Clear existing session overrides (this is the key):
  • start fresh sessions with /new in each active Discord thread/channel and Telegram chat/topic
  • or clear model override to inherit in Sessions UI
#
  • or set each active session explicitly once: /model minimax/MiniMax-M2.7
  1. Optional hard pin by channel (if you want per-channel enforcement for new sessions):
{
channels: {
modelByChannel: {
discord: {
"123456789012345678": "minimax/MiniMax-M2.7"
},
telegram: {
"-1001234567890": "minimax/MiniMax-M2.7",
"-1001234567890:topic:99": "minimax/MiniMax-M2.7"
}
}
}