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
+1 -1
View File
@@ -251,7 +251,7 @@ impl SubAgent {
last_error = Some(anyhow::anyhow!("Context length exceeded"));
break;
}
Err(ProviderError::RateLimitExceeded(_)) => {
Err(ProviderError::RateLimitExceeded { .. }) => {
self.set_status(SubAgentStatus::Completed("Rate limit exceeded".to_string()))
.await;
last_error = Some(anyhow::anyhow!("Rate limit exceeded"));