effect-io-ai

Package: @effect/ai-anthropic
Module: AnthropicError

AnthropicError.AnthropicRateLimitMetadata

Anthropic-specific rate limit metadata fields.

Details

Extends base error metadata with rate limit-specific information from Anthropic’s rate limit headers.

Signature

type AnthropicRateLimitMetadata = AnthropicErrorMetadata & {
  /**
   * Number of requests allowed in the current period.
   */
  readonly requestsLimit: number | null
  /**
   * Number of requests remaining in the current period.
   */
  readonly requestsRemaining: number | null
  /**
   * Time when the request rate limit resets.
   */
  readonly requestsReset: string | null
  /**
   * Number of tokens allowed in the current period.
   */
  readonly tokensLimit: number | null
  /**
   * Number of tokens remaining in the current period.
   */
  readonly tokensRemaining: number | null
  /**
   * Time when the token rate limit resets.
   */
  readonly tokensReset: string | null
}

Source

Since v4.0.0