Skip to content

bug(vertexai): timeout config not working in ChatVertexAI and VertexAI #1286

@tvieirabruna

Description

@tvieirabruna

Even when a timeout is specified in the configuration for ChatVertexAI or VertexAI, the DeadlineExceeded exception is not thrown.

if provider == "vertexai":
        return VertexAI(
            model="gemini-2.5-flash-lite",
            temperature=0.3,
            timeout=1,
            max_retries=1,
            location=xxxx,
            project=xxxx
        )
    else:
        return ChatVertexAI(
            model="gemini-2.5-flash-lite",
            temperature=0.3,
            timeout=1,
            location=xxxxx,
            project=xxxxx
            labels={
                xxxx
            }
        )

Output:
Time taken: 3.264 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvertexai

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions