Skip to content

Copybara import of the project:#2360

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
copybara/906620787
Open

Copybara import of the project:#2360
copybara-service[bot] wants to merge 1 commit intomainfrom
copybara/906620787

Conversation

@copybara-service
Copy link
Copy Markdown

Copybara import of the project:

--
b5c7090 by Mukunda Rao Katta mukunda.vjcs6@gmail.com:

fix(retry): retry on httpx.TimeoutException with HttpRetryOptions

The retry predicate in retry_args only matched errors.APIError subclasses,
so lower-level httpx transport exceptions (httpx.TimeoutException,
httpx.ConnectError, and their subclasses such as ReadTimeout /
ConnectTimeout) were silently dropped and never retried, even when
HttpRetryOptions was explicitly configured.

Long-running LLM inference calls regularly hit transient transport errors
from load balancers, NAT gateways, and idle TCP timeouts. Vertex AI's
retry strategy guidance lists socket timeouts and TCP disconnects as
retryable, so honoring those here matches user expectations.

Fixes #2337.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#2345 from MukundaKatta:fix/retry-httpx-timeout 9b2d886

--
b5c7090 by Mukunda Rao Katta <mukunda.vjcs6@gmail.com>:

fix(retry): retry on httpx.TimeoutException with HttpRetryOptions

The retry predicate in `retry_args` only matched `errors.APIError` subclasses,
so lower-level httpx transport exceptions (`httpx.TimeoutException`,
`httpx.ConnectError`, and their subclasses such as `ReadTimeout` /
`ConnectTimeout`) were silently dropped and never retried, even when
`HttpRetryOptions` was explicitly configured.

Long-running LLM inference calls regularly hit transient transport errors
from load balancers, NAT gateways, and idle TCP timeouts. Vertex AI's
retry strategy guidance lists socket timeouts and TCP disconnects as
retryable, so honoring those here matches user expectations.

Fixes #2337.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#2345 from MukundaKatta:fix/retry-httpx-timeout 9b2d886
PiperOrigin-RevId: 906620787
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

httpx.TimeoutException is not retried despite HttpRetryOptions being configured

1 participant