backend-client: route requests through HTTP client factory

This commit is contained in:
Michael Bolin
2026-07-09 11:53:23 -07:00
parent a45cdd65cd
commit 132bd72d99
24 changed files with 711 additions and 134 deletions
+7 -3
View File
@@ -18,9 +18,13 @@ async fn rate_limits_check(auth_manager: &AuthManager, config: &Config) -> Optio
return None;
}
let client = BackendClient::from_auth(config.chatgpt_base_url.clone(), &auth)
.map_err(|err| warn!(%err, "failed to construct backend client"))
.ok()?;
let client = BackendClient::from_auth(
config.chatgpt_base_url.clone(),
&auth,
config.http_client_factory(),
)
.map_err(|err| warn!(%err, "failed to construct backend client"))
.ok()?;
let snapshots = client
.get_rate_limits_many()