Skip to content
Changelog

Control Gemini request duration with a new timeout parameter

Community contributorFehmi

March 17, 20261 min read

The Gemini model class now accepts a timeout parameter, giving teams explicit control over how long a request is allowed to run before being cancelled. This is particularly useful for production deployments where unbounded request durations can affect reliability and resource utilization.

Details**:**

  • Set timeout (in seconds) directly on the Gemini model instance
  • Applies to all request types made through the Gemini model class
  • Falls back to the existing default behavior when not set; no migration required

See reference in docs.

Shipped around the same time