fix: add retry_options to Quick Start to handle transient 503 errors#6059
fix: add retry_options to Quick Start to handle transient 503 errors#6059KellySit wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Response from ADK Triaging Agent Hello @KellySit, thank you for creating this PR! This PR looks great and has been labeled as Before we can review and accept your contributions, please make sure you sign the Google Contributor License Agreement as detailed in the Contribution Guidelines. If you have already signed it, please ensure your git commit email matches the email associated with your signed CLA. Thank you! |
Link to Issue or Description of Change
Issue 5937: #5937
Problem:
Went through a quick start and experienced the following error:
errorCode : "ServerError" errorMessage : "503 UNAVAILABLE. {'error': {'code': 503, 'message': 'This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.', 'status': 'UNAVAILABLE'}}"
Solution:
. Updated adk-python/README.md
Change the Quick Start "Agent" example to use the Gemini model class with retry_options instead of a bare model string.
Similarly update the quickstart sample to use Gemini with retry_options so it matches the README and serves as a working reference.
Testing Plan
Unit Tests:
Manual End-to-End (E2E) Tests:
Just follow the changed quick start guidelines, even if the model is in high demand, now it should be able to automatically retry and avoid transient 503 errors.
Checklist
Additional context