Class ProviderInitializationError

Thrown by createProviderManager when the requested provider did not initialize: a rejected or revoked API key (the provider's model listing answers 401), an unreachable endpoint, or a provider id the manager does not know. The fallback walker treats it as retryable, so a primary whose key stopped working fails over like one that answers 401 on the call.

httpStatus repeats the cause's HTTP status when it has one, which the provider health registry uses to pick its cooldown.

Hierarchy

  • Error
    • ProviderInitializationError

Constructors

Properties

Constructors

Properties

providerId: string

Provider that failed to initialize.

httpStatus?: number

HTTP status of the underlying failure, when it had one.

cause?: unknown

The error the provider threw during initialization, when there was one.