Skip to main content
The @cline/llms package provides provider registries, model catalogs, handlers, and a gateway. @cline/agents and @cline/core use this layer internally.

Configure a Provider

Provider config can include apiKey, baseUrl, headers, and provider-specific settings through core/provider config types. Common environment variables:

OpenAI-Compatible Providers

Use openai-compatible for providers that expose an OpenAI-compatible API:

AWS Bedrock

Bedrock uses AWS credentials from the standard environment/SDK chain and provider-specific config:

Gateway API

Use DefaultGateway or createGateway when you need direct provider/model access:
The package also exports registry helpers such as getAllProviders, getProviderIds, getModelsForProvider, registerProvider, and registerModel. See Gateway reference for exact APIs.

Model Metadata

Models expose metadata for selection and cost calculations:

Cost Tracking

Agent results and usage events include token usage: