plano/crates/common
Troy Mitchell a58a283e20 common: add RetryPolicy configuration types
Add retry policy configuration types to support automatic retry and
failover for LLM requests:

- RetryPolicy: top-level config with fallback_models, default_strategy,
  default_max_attempts, and per-status-code overrides
- BackoffConfig: exponential backoff with base_ms, max_ms, jitter, and
  scope (per-model, per-provider, or global)
- RetryAfterConfig: Retry-After header handling with block scope and
  duration limits
- HighLatencyConfig: latency-based blocking with threshold, measurement
  type, and trigger conditions
- LatencyTriggerConfig: min_triggers and trigger_window for debouncing
- RetryStrategy enum: same_model, same_provider, different_provider
- StatusCodeEntry: flexible status code matching (single, range, list)

Also add retry_policy field to GatewayConfig with Default impl.

Signed-off-by: Troy Mitchell <i@troy-y.org>
2026-04-28 15:22:47 +08:00
..
src common: add RetryPolicy configuration types 2026-04-28 15:22:47 +08:00
Cargo.lock split wasm filter (#186) 2024-10-16 14:20:26 -07:00
Cargo.toml common: add proptest dev-dependency for configuration tests 2026-04-28 15:20:21 +08:00