OpenRouterConfig

OpenRouterConfig is a configuration class for setting up the OpenRouter client. It manages essential parameters such as API key, base URL, connection timeout settings, and the HTTP client used for requests.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Defines the base URL used for configuring the target endpoint of the OpenRouter API. This property allows customization of the API's base endpoint to interact with different server environments or instances beyond the default URL.

Link copied to clipboard

Represents the HTTP client used to handle network requests within the configuration. This client can be customized or replaced to adapt to specific use cases, such as modifying headers, interceptors, or other client-level configurations.

Link copied to clipboard

Represents the configuration for connection timeouts used in network requests. This configuration specifies the timeout durations in milliseconds for requests, connection establishment, and socket operations.

Functions

Link copied to clipboard

Configures timeout settings to be applied to the client.