[KongchangAI]
Product

llm-retry

A single-header C++ library providing retry (with_retry), failover (with_failover) and circuit breaker (CircuitBreaker) functionality for scenarios such as LLM API calls.

Timeline (last 90 days)

Oct 19

In a test with 100 concurrent calls, a token bucket capacity of 20, and 10 tokens replenished per second, llm-retry's default configuration (3 retries, exponential backoff, ±10% jitter) caused 64 calls to fail completely.

Unverified50%
Oct 19

In the same test, under the default configuration the 36 successful requests caused the server to additionally reject 255 requests, a request amplification factor of 2.55x.

Unverified50%
Oct 19

llm-retry is a single-header C++ library that provides with_retry, with_failover, and CircuitBreaker functionality.

Unverified50%
Oct 19

After raising llm-retry's max_attempts to 8, all 100 calls passed, but it took 16.6 seconds, more than double the theoretical lower bound, and sent 375 requests.

Unverified50%
Oct 19

The ±10% jitter causes all clients that failed at 0 seconds to wait 450-550 milliseconds, so that 80 retries arrive crowded into the same 100-millisecond window, forming waves and failing to effectively spread out retry timing.

Unverified50%
Oct 19

llm-retry's LLMError type has no retry-after field.

Unverified50%
Oct 19

llm-retry's default retry_on_http_codes list does not include 529 (overloaded_error) and 408 (request timeout), causing these errors to never be retried.

Unverified50%
Oct 19

llm-retry's with_failover feature silently retries 400 errors (such as prompt too long or JSON format errors) to the fallback model, masking the error and causing quality degradation that no one notices.

Unverified50%

All Facts (8)

Source Articles