Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Provider Rate Limits, Timeouts, and Retries

Providers limit request rates and execution time. Diagnose those limits separately from invalid credentials or malformed input.

Classify the failure before retrying

Illustrative application logic, not a StackAI SDK. Implement these helpers using the selected provider’s documented errors and retry contract. Do not assume every action retries automatically.

Copy the example
if result.is_rate_limited:
    follow_provider_retry_delay(result)
    reduce_request_concurrency()
elif result.is_authentication_error:
    repair_connection()  # Retrying will not fix credentials.
elif result.outcome_is_uncertain:
    reconcile_provider_result()  # Check before another write.
else:
    handle_operation_specific_error(result)

Before you begin

The provider response, action name, and affected run ID.

Key concepts

Term
Definition

Rate limit

A restriction on request volume over a provider-defined interval. Reduce request pressure and follow any returned retry delay.

Timeout

A limit on how long a particular client or operation waits. It does not always establish that execution or an external write stopped.

Retry

A repeated attempt after a failed or uncertain operation. It can repeat external changes; use it only when the result is understood.

Transient failure

A failure that can resolve without changing the intended input, such as a temporary service interruption. Retry guidance is operation-specific; invalid credentials or fields usually require correction.

Idempotency

A contract under which repeating the same intended operation does not create an additional change. Use it only where the provider or public operation explicitly supports it.

Handle provider request limits

  1. Inspect the status and error message.

  2. Follow a returned retry delay where the provider supplies one. Reduce concurrency or request size when appropriate.

  3. Check the destination before repeating an operation that changes data.

The workflow can recover without repeatedly exceeding the same limit.

Behavior and limitations

Rate limits differ by provider, account, and operation. Not every action retries automatically. A timeout can occur after a provider accepts a write, so retrying can create duplicates. Reconnection does not solve a quota error, and increasing a workflow timeout does not remove a provider rate limit.

Connection Ownership, Sharing, and Permissions

Was this helpful?