MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / on_retry

Function on_retry

mini_agent/cli.py:552–556  ·  view source on GitHub ↗

Retry callback function to display retry information

(exception: Exception, attempt: int)

Source from the content-addressed store, hash-verified

550
551 # Create retry callback function to display retry information in terminal
552 def on_retry(exception: Exception, attempt: int):
553 """Retry callback function to display retry information"""
554 print(f"\n{Colors.BRIGHT_YELLOW}⚠️ LLM call failed (attempt {attempt}): {str(exception)}{Colors.RESET}")
555 next_delay = retry_config.calculate_delay(attempt - 1)
556 print(f"{Colors.DIM} Retrying in {next_delay:.1f}s (attempt {attempt + 1})...{Colors.RESET}")
557
558 # Convert provider string to LLMProvider enum
559 provider = LLMProvider.ANTHROPIC if config.llm.provider.lower() == "anthropic" else LLMProvider.OPENAI

Callers 1

wrapperFunction · 0.85

Calls 1

calculate_delayMethod · 0.80

Tested by

no test coverage detected