Confirmation of Request Source
Describe the feature you'd like
Concept: Add customizable retry policies for gRPC rate limits (RESOURCE_EXHAUSTED) and transient network dropouts (UNAVAILABLE).
Why it matters: Network glitches and API rate limits currently throw unhandled gRPC errors. A built-in exponential backoff decorator makes production applications resilient out of the box.
Additional Context
Implementation Scope:
from xai_sdk import Client, RetryPolicy
client = Client(
retry_policy=RetryPolicy(
max_retries=3,
backoff_factor=1.5,
retry_on=[grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.RESOURCE_EXHAUSTED]
)
)
Confirmation of Request Source
Describe the feature you'd like
Concept: Add customizable retry policies for
gRPCrate limits (RESOURCE_EXHAUSTED) and transient network dropouts (UNAVAILABLE).Why it matters: Network glitches and API rate limits currently throw unhandled
gRPCerrors. A built-in exponential backoff decorator makes production applications resilient out of the box.Additional Context
Implementation Scope: