Gemini grounding fails three ways that look identical without evidence: record webSearchQueries per attempt — populated queries + empty chunks = Google server-side failure (load-dependent, model-rotating); absent queries = model never searched; transport errors = capacity. Retry both flake modes, keep partial text, cap retries (billing).
Gemini's google_search grounding tool has three distinct failure modes that look identical from the caller's perspective (no usable citations) but have different causes and remedies. The groundingMetadata.webSearchQueries field discriminates them — record it per attempt in your debug artifacts.
webSearchQueries populated, groundingChunks empty/None
Google's grounding backend failed server-side — the model DID search, the search subsystem returned nothing
Retry/wait; not your bug. Load-dependent (see below)
webSearchQueries empty/absent
The model never invoked search — prompt or model-routing issue
Fix the prompt/tool config; retrying the same request rarely helps
Transport exception (504 DEADLINE_EXCEEDED, 503 UNAVAILABLE, or through litellm the misleading litellm.Timeout: Connection timed out after None seconds — the 'None seconds' is a litellm error-reporting bug, BerriAI/litellm#14635)
Capacity/timeout on Google's side
Retry with backoff; cap attempts (billing!)
The Apr 2026 grounding outage (googleapis/python-genai#2249, Google-confirmed) established: grounding has an undocumented per-project throughput ceiling far below published RPM quotas; capacity rotates between models on shared GPU pools (a model at 100% success at 00:00 UTC was at 0% at 08:00 UTC same day); failures cluster in multi-hour windows. We independently confirmed the window pattern in production: two separate deployments running DIFFERENT code versions failed identically within 12 minutes of each other, and the identical call succeeded first-try 7.5 hours later.
error OR text_len/n_chunks/n_supports/webSearchQueries) in your debug artifacts, including on the total-failure path — otherwise server-side outage and client bug are indistinguishable post-hoc.