mirror of
https://github.com/katanemo/plano.git
synced 2026-04-25 00:36:34 +02:00
Add 302 property-based unit tests (proptest, 100+ iterations each) and 13 integration test scenarios covering all retry behaviors. Unit tests cover: - Configuration round-trip parsing, defaults, and validation - Status code range expansion and error classification - Exponential backoff formula, bounds, and scope filtering - Provider selection strategy correctness and fallback ordering - Retry-After state scope behavior and max expiration updates - Cooldown exclusion invariants and initial selection cooldown - Bounded retry (max_attempts + budget enforcement) - Request preservation across retries - Latency trigger sliding window and block state management - Timeout vs high-latency precedence - Error response detail completeness Integration tests (tests/e2e/): - IT-1 through IT-13 covering 429/503 retry, exhaustion, backoff, fallback priority, Retry-After honoring, timeout retry, high-latency failover, streaming preservation, and body preservation
28 lines
798 B
YAML
28 lines
798 B
YAML
version: v0.3.0
|
|
|
|
listeners:
|
|
- type: model
|
|
name: model_listener
|
|
port: 12000
|
|
|
|
model_providers:
|
|
- model: openai/gpt-4o
|
|
base_url: http://host.docker.internal:${MOCK_PRIMARY_PORT}
|
|
access_key: test-key-primary
|
|
default: true
|
|
retry_policy:
|
|
fallback_models: [anthropic/claude-3-5-sonnet, mistral/mistral-large]
|
|
default_strategy: "different_provider"
|
|
default_max_attempts: 3
|
|
on_status_codes:
|
|
- codes: [429]
|
|
strategy: "different_provider"
|
|
max_attempts: 3
|
|
|
|
- model: anthropic/claude-3-5-sonnet
|
|
base_url: http://host.docker.internal:${MOCK_FALLBACK1_PORT}
|
|
access_key: test-key-fallback1
|
|
|
|
- model: mistral/mistral-large
|
|
base_url: http://host.docker.internal:${MOCK_FALLBACK2_PORT}
|
|
access_key: test-key-fallback2
|