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
}
)