Retry callback function to display retry information
(exception: Exception, attempt: int)
| 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 |
no test coverage detected