Skip to content

Commit f59e203

Browse files
authored
fix(provider): overhaul openai-subscription retry policy (#32)
Statusless errors like service_unavailable_error/server_is_overloaded failed fatally because retriability was an exact-match allowlist. Classification now defaults to retrying and excludes permanent errors by heuristic instead. - retry budget 10m -> 24h, time-driven only (MAX_RETRIES removed) - backoff cap 30s -> 60s; per-attempt 10m guard on send/credentials - honor x-ratelimit-reset-* on 429 over Retry-After: pace waits at 10m and retry until reset + 10m grace, clamped to the 24h budget - cap all server delay hints at 10m - reopen_stream keeps request_context in place so a cancelled reopen stays retryable from the first-event timeout path
1 parent 557b54b commit f59e203

3 files changed

Lines changed: 327 additions & 129 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kit"
3-
version = "0.1.95"
3+
version = "0.1.96"
44
edition = "2024"
55
rust-version = "1.94.0"
66
publish = false
@@ -85,6 +85,7 @@ windows-sys = { version = "=0.61.2", features = [
8585
[dev-dependencies]
8686
jsonwebtoken = { version = "=11.0.0", default-features = false, features = ["aws_lc_rs", "use_pem"] }
8787
tempfile = "=3.27.0"
88+
tokio = { version = "=1.53.1", features = ["test-util"] }
8889

8990
[patch.crates-io]
9091
agentkit-acp = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }

0 commit comments

Comments
 (0)