# Control Gemini request duration with a new timeout parameter

> 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.

- Published: 2026-03-17
- Author: Agno Team
- Category: Changelog
- Canonical: https://agno-com-nine.vercel.app/articles/add-timeout-parameter-to-the-gemini-model-class
- Markdown: https://agno-com-nine.vercel.app/articles/add-timeout-parameter-to-the-gemini-model-class.md

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](https://docs.agno.com/reference/models/gemini).
