Skip to content

handle error message when the model is experiencing high demand #5937

@KellySit

Description

@KellySit

Describe the Bug:
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'}}"

Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:

  1. Follow all current Quick Start instructions
  2. If the model is now experiencing high demand, the error may appear.

Expected and Observed Behavior:
Unable to respond to the user for a short period of time.

Environment Details:

  • ADK Library Version : 2.1.0
  • Desktop OS: macOS
  • Python Version: 3.11

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-2.5-flash

Additional Context:
I suggest trying to add retry configuration to the gemini model in the Quick Start README.md (Agent part) to automatically handle these transient errors, since gemini 2.5 flash can be configured to automatically retry on this error using retry_options parameter in Gemini class.
But overall it is not an urgent bug to be fixed as it is a temporary issue which can resolve itself in a short wait.

How often has this issue occurred?:
Rare, only when the model is in high demand

Metadata

Metadata

Labels

documentation[Component] This issue is related to documentation, it will be transferred to adk-docsrequest clarification[Status] The maintainer need clarification or more information from the author

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions