diff --git a/src/llama_stack_client/_base_client.py b/src/llama_stack_client/_base_client.py index 5a0376e6..c7d89a69 100644 --- a/src/llama_stack_client/_base_client.py +++ b/src/llama_stack_client/_base_client.py @@ -734,7 +734,11 @@ def _should_retry(self, response: httpx.Response) -> bool: return True # Retry internal errors. - if response.status_code >= 500: + if response.status_code in ( + 502, # Bad Gateway + 503, # Service Unavailable + 504, # Gateway Timeout + ): log.debug("Retrying due to status code %i", response.status_code) return True