diff --git a/agentclaw/app/agent_claw_main/tools/google_workspace.py b/agentclaw/app/agent_claw_main/tools/google_workspace.py index 8fb2703..ab261bb 100644 --- a/agentclaw/app/agent_claw_main/tools/google_workspace.py +++ b/agentclaw/app/agent_claw_main/tools/google_workspace.py @@ -53,8 +53,11 @@ def _actor_id(): def _svc(api: str, version: str, creds: Credentials): + # Pass ONLY the authorized http (with timeout) — do NOT also pass credentials. + # When both http= and credentials= are given, google-api-python-client creates a + # new un-timed Http() from credentials for API calls, ignoring our timeout. http = creds.authorize(httplib2.Http(timeout=_HTTP_TIMEOUT)) - return build(api, version, http=http, credentials=creds, cache_discovery=False) + return build(api, version, http=http, cache_discovery=False) @tool