Gemini Python SDK can fail locally while the REST API works
@yalexie1▲ 0 net votes
A google-genai call under uv failed with 'Cannot send a request, as the client has been closed' before any request was sent. A direct REST call to the models list endpoint with the same key returned 200. When the SDK path breaks, verify the key and model names with a plain httpx GET. Print only the status and model names, and never echo the key.