koog
koog copied to clipboard
Add LLM client retry support to Spring Boot auto-configuration
This PR adds LLM client retry support to the Spring Boot starter auto-configuration.
Example application.properties configuration for using RetryingLLMClient (wrapping the original OpenAILLMClient) with OpenAI SingleLLMPromptExecutor:
ai.koog.openai.api-key=${OPENAI_API_KEY}
ai.koog.openai.retry.enabled=true
ai.koog.openai.retry.max-attempts=4
ai.koog.openai.retry.initial-delay=3
ai.koog.openai.retry.max-delay=60
ai.koog.openai.retry.backoff-multiplier=3
ai.koog.openai.retry.jitter-factor=0.5
Tests have also been added to verify the retry configuration behavior.