Environment
- OpenClaw Version: 2026.3.13 (CLI) / 2026.3.11 (Gateway — version mismatch detected by
openclaw doctor)
- OS: OpenCloudOS (Tencent Cloud Singapore, Linux aarch64-compatible VM)
- Node: v22.22.0 (via nvm)
- Channel: Discord (guild channel,
@LusterClaw Bot)
- Provider:
minimax-portal (OAuth mode, api: "anthropic-messages")
- Model:
minimax-portal/MiniMax-M2.5 (default)
- baseUrl:
https://api.minimaxi.com/anthropic
Problem Summary
OpenClaw's internal usage tracker for the minimax-portal provider persistently reports "0% left" on the 5-hour rolling window, which causes the Discord channel to refuse requests. Meanwhile:
- CLI
openclaw agent works perfectly — returns correct responses with valid token usage
- Browser/web chat works — same model, same API key
- MiniMax official website shows the account balance is nearly full and unused
- Discord fails — reports insufficient balance / quota exhausted
This means OpenClaw's usage tracking is incorrectly calculating that the MiniMax Portal quota is exhausted when it isn't.
Evidence from Server Logs
1. Health check consistently shows "0% left"
Every openclaw health run and every heartbeat log entry shows:
Usage:
MiniMax
5h: 0% left · resets 1h Xm
This has been persistent across multiple checks on 2026-03-22.
2. CLI agent test succeeds with correct token usage
openclaw agent --agent main --message "ping" --json
Returns successfully:
{
"status": "ok",
"result": {
"payloads": [{ "text": "pong 🏓" }],
"meta": {
"agentMeta": {
"provider": "minimax-portal",
"model": "MiniMax-M2.5",
"lastCallUsage": {
"input": 82,
"output": 35,
"cacheRead": 0,
"cacheWrite": 17126,
"total": 17243
}
}
}
}
}
Token usage is non-zero and correct, yet the usage tracker still shows 0%.
3. Discord in disconnect/reconnect loop
The health-monitor keeps detecting Discord as disconnected every ~10 minutes and restarting:
[discord:default] health-monitor: restarting (reason: disconnected)
[default] starting provider (@LusterClaw Bot)
logged in to discord as 1481841511573491722 (LusterClaw Bot)
[discord:default] health-monitor: restarting (reason: disconnected) ← 10 min later
Last successful Discord message was ~6 days ago (agent:main:discord:channel:... (9023m ago)).
4. Gateway version mismatch
openclaw doctor reports the gateway service entrypoint doesn't match the current install:
This version mismatch may contribute to the issue.
Reproduction Steps
- Configure
minimax-portal provider with OAuth on a self-hosted OpenClaw server
- Set
minimax-portal/MiniMax-M2.5 as default model
- Enable Discord channel
- Send messages via Discord — observe failure due to "0% left" usage
- Run
openclaw agent --message "ping" --json — observe it works fine
- Run
openclaw health — observe "5h: 0% left" for MiniMax
- Check actual MiniMax account balance on minimaxi.com — balance is full
Expected Behavior
- The usage tracker should accurately reflect actual MiniMax Portal usage
- If CLI calls succeed with valid token counts, the usage tracker should not report "0% left"
- Discord channel should work the same as CLI and browser channels
Actual Behavior
- Usage tracker permanently stuck at "0% left" for
minimax-portal
- Discord refuses requests based on this incorrect usage data
- CLI bypasses usage check and works fine
- Browser/web chat also works
Possibly Related Issues
Additional Context
The minimax-portal provider config has cost set to all zeros:
{
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}
This zero-cost configuration may interact badly with the usage percentage calculation (e.g., division by zero or treating zero-cost as "fully consumed"). The separate minimax provider (API key mode) has non-zero costs configured and may not be affected.
Environment
openclaw doctor)@LusterClaw Bot)minimax-portal(OAuth mode,api: "anthropic-messages")minimax-portal/MiniMax-M2.5(default)https://api.minimaxi.com/anthropicProblem Summary
OpenClaw's internal usage tracker for the
minimax-portalprovider persistently reports "0% left" on the 5-hour rolling window, which causes the Discord channel to refuse requests. Meanwhile:openclaw agentworks perfectly — returns correct responses with valid token usageThis means OpenClaw's usage tracking is incorrectly calculating that the MiniMax Portal quota is exhausted when it isn't.
Evidence from Server Logs
1. Health check consistently shows "0% left"
Every
openclaw healthrun and every heartbeat log entry shows:This has been persistent across multiple checks on 2026-03-22.
2. CLI agent test succeeds with correct token usage
openclaw agent --agent main --message "ping" --jsonReturns successfully:
{ "status": "ok", "result": { "payloads": [{ "text": "pong 🏓" }], "meta": { "agentMeta": { "provider": "minimax-portal", "model": "MiniMax-M2.5", "lastCallUsage": { "input": 82, "output": 35, "cacheRead": 0, "cacheWrite": 17126, "total": 17243 } } } } }Token usage is non-zero and correct, yet the usage tracker still shows 0%.
3. Discord in disconnect/reconnect loop
The health-monitor keeps detecting Discord as disconnected every ~10 minutes and restarting:
Last successful Discord message was ~6 days ago (
agent:main:discord:channel:... (9023m ago)).4. Gateway version mismatch
openclaw doctorreports the gateway service entrypoint doesn't match the current install:[email protected][email protected]This version mismatch may contribute to the issue.
Reproduction Steps
minimax-portalprovider with OAuth on a self-hosted OpenClaw serverminimax-portal/MiniMax-M2.5as default modelopenclaw agent --message "ping" --json— observe it works fineopenclaw health— observe "5h: 0% left" for MiniMaxExpected Behavior
Actual Behavior
minimax-portalPossibly Related Issues
Additional Context
The
minimax-portalprovider config hascostset to all zeros:{ "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 } }This zero-cost configuration may interact badly with the usage percentage calculation (e.g., division by zero or treating zero-cost as "fully consumed"). The separate
minimaxprovider (API key mode) has non-zero costs configured and may not be affected.