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 ADK Python model calls a 10-second default heartbeat timeout #519
Is your feature request related to a problem? Please describe.
TemporalModel schedules its model Activities with no heartbeat timeout by default. So by default:
A cancel never reaches a running model call. It runs to the end, even when the Workflow is cancelled.
A lost worker goes unnoticed until the 60-second start-to-close timeout.
Can't I set heartbeat_timeout myself? Not really. invoke_model never heartbeats, and invoke_model_streaming only heartbeats when a response arrives. So a model call slower than the timeout fails. With a 1-second heartbeat timeout and a model that takes 2 seconds, I get:
ActivityError: Activity task timed out
TimeoutError: activity Heartbeat timeout
Give both model Activities a 10-second heartbeat_timeout when activity_config doesn't set one. heartbeat_timeout=None turns heartbeats off.
Heartbeat on a timer at half the timeout, instead of once per streamed response. The timer sleeps first, so a call shorter than 5 seconds sends no heartbeat.
Additional context
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 service is an Action: at most one every 8 seconds of a running call.
activity_as_tool and activity_node run your own Activities, so they stay as they are. MCP is out of scope for now.
Activity
[python/google_adk] breaking: give model calls a 10-second default he…