feat: Parse and use retryDelay from Google API RateLimitExceeded errors (#4124)

Signed-off-by: sings-to-bees-on-wednesdays <222684290+sings-to-bees-on-wednesdays@users.noreply.github.com>
Co-authored-by: Jack Amadeo <jackamadeo@block.xyz>
Co-authored-by: Jack Amadeo <jackamadeo@squareup.com>
This commit is contained in:
sings-to-bees-on-wednesdays
2025-09-25 15:05:18 +00:00
committed by GitHub
parent 94cf5c85a0
commit b5c133cecb
9 changed files with 113 additions and 25 deletions
@@ -389,7 +389,7 @@ pub async fn get_provider_models(
ProviderError::UsageError(_) => StatusCode::BAD_REQUEST,
// Transient errors - client should retry later
ProviderError::RateLimitExceeded(_) => StatusCode::TOO_MANY_REQUESTS,
ProviderError::RateLimitExceeded { .. } => StatusCode::TOO_MANY_REQUESTS,
// All other errors - internal server error
_ => StatusCode::INTERNAL_SERVER_ERROR,