# Function calculateDelay

Adapters exports - Model adapters (Claude, OpenAI, Gemini, Ollama) Split from index.ts for file size compliance (Issue #285)

- calculateDelay(attempt: number, config: RetryConfig): number

  Calculates delay with exponential backoff and jitter.

  Uses full jitter strategy: delay = random(0, min(maxDelay, baseDelay * 2^attempt))

  #### Parameters

  - attempt: number

    Current attempt number (0-based)

  - config: RetryConfig

    Retry configuration

  #### Returns number

  Delay in milliseconds

  - Defined in packages/nexus-agents/src/adapters/retry.ts:114