A longer call fails with an internal-server or deadline-exceeded error.
Why this happens
Requests can breach client-side deadlines, experience network degradation, or hit temporary infrastructure issues on the provider side.
Answer 1: Use a realistic client timeout
from google import genai
from google.genai import types
client = genai.Client(http_options=types.HttpOptions(timeout=60_000))
Verify timeout support in your specific SDK version; pass options via client configurations if constructor arguments differ.
