Skip to content

[Bug] Gemini timeout is ignored when http_options is set via client_params #7599

@jerryyxu

Description

@jerryyxu

Description

In agno.models.google.Gemini.get_client(), timeout is only injected when http_options is a dict.
If http_options is a HttpOptions object (or later overridden by client_params.update(...)), self.timeout is not applied.

As a result, configured model timeout may be ignored, and requests still use default long connect timeout (e.g. 120s).
Image

Steps to Reproduce

  1. Create a Gemini model with:
    • timeout=0.1
    • client_params={"http_options": HttpOptions(...)}
  2. Trigger a request in a network-constrained environment.
  3. Observe logs: request still uses long default connect timeout (e.g. connect timeout=120) instead of 0.1s.

Agent Configuration (if applicable)

No response

Expected Behavior

self.timeout should be applied to final effective http_options consistently, regardless of source/type.

Actual Behavior

self.timeout is ignored

Screenshots or Logs (if applicable)

No response

Environment

macOS

Possible Solutions (optional)

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions