You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Give google-genai calls a 10-second default heartbeat timeout #550
Is your feature request related to a problem? Please describe.
TemporalAsyncClient runs every Gemini call as one of 16 plugin activities: model calls, files, file search uploads, interactions and managed agents. None of them heartbeats, except the interaction streams, which heartbeat once per event. And the client sets no heartbeat_timeout. So by default:
A cancel never reaches a running call. A generate_content call runs to the end, and we pay for it.
A lost worker goes unnoticed until the 60-second start-to-close timeout.
Can't you set heartbeat_timeout yourself? Not today: the calls don't heartbeat, so every call longer than the timeout fails and retries. Interaction streams only survive while events keep coming.
Every one of the 16 activities heartbeats on a timer at half the heartbeat timeout, for as long as the call runs. The first heartbeat goes out half the timeout into the call, so a call shorter than that sends none.
The interaction streams stop heartbeating per event.
heartbeat_timeout defaults to 10 seconds, also when activity_config leaves it out. A timeout you set wins, and None or timedelta(0) turns heartbeats off.
Additional context
activity_as_tool runs your own activities, so it stays as it is. The MCP activities are out of scope for now.
It doesn't affect replay: core only compares an activity's ID and type, and heartbeats aren't in History. In Temporal Cloud each heartbeat that reaches the server is an Action: at most one every 8 seconds of a running call, and none for a call shorter than 5 seconds.
Activity
Breaking: give google-genai calls a 10-second default heartbeat timeo…