Skip to content

[Feature Request] Give Google ADK Python model calls a 10-second default heartbeat timeout #519

Closed

Description

@campoy

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

This is the Python Google ADK part of #491.

Describe the solution you'd like

  • 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

  1. added
    enhancement
    on Nov 13, 2026
  2. added a commit that references this issue on Nov 17, 2026
    84f7e84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions