Add retry logic and circuit breakers for external service calls #10
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
All calls to Qdrant, Ollama, Anthropic, and external HTTP endpoints are single-shot with no retry or backoff:
compliance/services/llm_provider.py— single HTTP call, notenacitydecoratorA single transient timeout causes the entire user request to fail and is indistinguishable from a permanent failure.
Required Actions
tenacitytobackend-compliance/requirements.txt@retry(wait=wait_exponential(min=1, max=10), stop=stop_after_attempt(3), reraise=True)pybreakeror equivalent — open the circuit after 5 consecutive failures, half-open after 30sgithub.com/sony/gobreakerfor backend callsAcceptance Criteria
Retry-Afterheader