Skip to content

http

@providerprotocol/ai


@providerprotocol/ai / http

HTTP utilities module for unified provider protocol.

This module provides comprehensive HTTP infrastructure including:

  • API key management with multiple strategies (round-robin, weighted, dynamic)
  • Retry strategies (exponential backoff, linear backoff, retry-after, no-retry)
  • Fetch wrappers with timeout and error normalization
  • Server-Sent Events (SSE) stream parsing
  • Standardized error handling and normalization

Re-exports dynamicKey


Re-exports exponentialBackoff


Re-exports ExponentialBackoffOptions


Re-exports linearBackoff


Re-exports LinearBackoffOptions


Re-exports noRetry


Re-exports retryAfterStrategy


Re-exports RetryAfterStrategyOptions


Re-exports roundRobinKeys


Re-exports weightedKeys