feat(proxy): update failover timeout and circuit breaker defaults (#521)

- Double all timeout values (streaming/non-streaming)
- Codex/Gemini: circuit_failure_threshold 5→4, error_rate 0.5→0.6
- Claude: circuit_error_rate_threshold 0.6→0.7
This commit is contained in:
Dex Miller
2026-01-04 11:52:12 +08:00
committed by GitHub
parent c71b030662
commit c049c5f2bb
4 changed files with 37 additions and 37 deletions
+2 -2
View File
@@ -49,10 +49,10 @@ pub struct CircuitBreakerConfig {
impl Default for CircuitBreakerConfig {
fn default() -> Self {
Self {
failure_threshold: 5,
failure_threshold: 4,
success_threshold: 2,
timeout_seconds: 60,
error_rate_threshold: 0.5,
error_rate_threshold: 0.6,
min_requests: 10,
}
}
+5 -5
View File
@@ -28,11 +28,11 @@ pub struct ProxyConfig {
}
fn default_streaming_first_byte_timeout() -> u64 {
30
60
}
fn default_streaming_idle_timeout() -> u64 {
60
120
}
fn default_non_streaming_timeout() -> u64 {
@@ -45,11 +45,11 @@ impl Default for ProxyConfig {
listen_address: "127.0.0.1".to_string(),
listen_port: 15721, // 使用较少占用的高位端口
max_retries: 3,
request_timeout: 300,
request_timeout: 600,
enable_logging: true,
live_takeover_active: false,
streaming_first_byte_timeout: 30,
streaming_idle_timeout: 60,
streaming_first_byte_timeout: 60,
streaming_idle_timeout: 120,
non_streaming_timeout: 600,
}
}