openclaw - 💡(How to fix) Fix [Bug] MiniMax API timeout causes complete request failure with no retry [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62464Fetched 2026-04-08 03:03:58
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

Code Example

[agent/embedded] embedded run failover decision: runId=8ed7902f-... stage=assistant decision=fallback_model reason=timeout provider=minimax/MiniMax-M2.7
[model-fallback/decision] model fallback decision: decision=candidate_failed requested=minimax/MiniMax-M2.7 candidate=minimax/MiniMax-M2.7 reason=timeout next=none
RAW_BUFFERClick to expand / collapse

Bug Description

MiniMax API (both M2.7 and M2.7-highspeed) is timing out during requests, causing complete failure with no retry. The fallback chain exhausts both models and then fails.

Frequency

4+ times in 24h period (2026-04-06 to 2026-04-07)

Log Evidence

[agent/embedded] embedded run failover decision: runId=8ed7902f-... stage=assistant decision=fallback_model reason=timeout provider=minimax/MiniMax-M2.7
[model-fallback/decision] model fallback decision: decision=candidate_failed requested=minimax/MiniMax-M2.7 candidate=minimax/MiniMax-M2.7 reason=timeout next=none

Impact

  • User requests fail completely when both MiniMax models timeout
  • No retry mechanism after fallback exhaustion
  • Affects all sessions using minimax provider

Suggested Fix

  • Add retry with exponential backoff for timeout errors
  • Consider adding more fallback models to the chain

extent analysis

TL;DR

Implementing a retry mechanism with exponential backoff for timeout errors in the MiniMax API requests is likely to mitigate the issue.

Guidance

  • Review the current request handling logic to identify where a retry mechanism can be integrated, focusing on handling timeout errors specifically.
  • Consider implementing an exponential backoff strategy to avoid overwhelming the MiniMax API with rapid retries, which could exacerbate the issue.
  • Evaluate the feasibility of adding more fallback models to the chain as suggested, to reduce the impact of timeouts on user requests.
  • Assess the current logging and monitoring setup to ensure that it captures detailed information about timeouts and retries, aiding in future diagnostics and optimization.

Example

import time
import random

def retry_with_backoff(max_attempts, initial_delay, max_delay):
    attempts = 0
    delay = initial_delay
    while attempts < max_attempts:
        try:
            # Make the API request here
            return True
        except TimeoutError:
            attempts += 1
            # Exponential backoff with jitter
            time.sleep(min(delay * (2 ** attempts) + random.uniform(0, 1), max_delay))
    return False

Notes

The effectiveness of adding more fallback models depends on the root cause of the timeouts and the availability of additional models. It's crucial to monitor the performance of the MiniMax API and adjust the retry strategy and fallback chain accordingly.

Recommendation

Apply workaround: Implement a retry mechanism with exponential backoff for timeout errors, as this directly addresses the reported issue of requests failing due to timeouts without retries.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING