google / google/adk-go

Feature request: retry mechanism for model errors

Open
#710 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
8.8k
Forks
1k
Avg merge
3d 14h
Merged PRs (30d)
93

Description

I am receiving frequent errors from Gemini models

```
error="workflow execution failed: failed to call model: Error 503, Message: This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later., Status: UNAVAILABLE, Details: []"
```

I understand that the recommended solution is a retry mechanism ([link](https://discuss.ai.google.dev/t/handling-429-503-errors-from-the-gemini-api/124640))

> To handle these errors, we strongly recommend implementing backoff and retry (our SDKs support this through retry config).

However, the `adk-go` or `go-genai` packages do not appear to have built-in support or hooks for this. It would be great to have a configurable request retry mechanism to handle these cases.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.