For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
    • Overview
    • Usage for Agents
  • TypeScript SDK
    • Overview
      • Analytics
      • APIKeys
      • Byok
      • Chat
      • Credits
      • Embeddings
      • Endpoints
      • Generations
      • Guardrails
        • RetryConfig
      • OAuth
      • Observability
      • Organization
      • Presets
      • Providers
      • Rerank
      • Beta.Responses
      • Transcriptions
      • Speech
      • VideoGeneration
      • Workspaces
  • Python SDK
    • Overview
  • Go SDK
  • DevTools
    • Overview
    • Migrating to @openrouter/agent
LogoLogo
ModelsChatRankingsDocs
On this page
  • Fields
  • BackoffStrategy
  • Fields
TypeScript SDKAPI ReferenceLib

RetryConfig - TypeScript SDK

RetryConfig method reference
Was this page helpful?
Previous

Models - TypeScript SDK

Models method reference
Next
Built with

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies.

Fields

NameTypeDescriptionExample
strategy`“backoff""none”`The retry strategy to use.
backoffBackoffStrategyWhen strategy is “backoff”, this configurates for the backoff parameters.
retryConnectionErrors*boolean*When strategy is “backoff”, this determines whether or not to retry on connection errors.true

BackoffStrategy

The backoff strategy allows retrying a request with an exponential backoff between each retry.

Fields

NameTypeDescriptionExample
initialInterval*number*The initial interval in milliseconds.500
maxInterval*number*The maximum interval in milliseconds.60000
exponent*number*The exponent to use for the backoff.1.5
maxElapsedTime*number*The maximum elapsed time in milliseconds.300000