AbstractBase constructor.
Type of the provider, used for registration and logging
ProtectedcapabilitiesSupport provider capabilities
ProtectedconfigCurrent connection config
Protected OptionalexecutorsReadonlyproviderType of this provider (OpenAI, Anthropic, Gemini, etc.)
Resolve and merge configuration for a capability.
Merge precedence (low → high):
Model resolution fallback: runtimeOptions.model → config.defaultModels[capability] → config.defaultModel
Name of the capability
Request-level override options
Merged configuration with keys: model, modelParams, providerParams, generalParams
Type-safe runtime check for a capability. Allows safe casting after confirming the capability is registered.
Capability key
Capability symbol
True if the capability is registered
Initialize the provider with a connection configuration. Must be implemented by concrete providers.
Connection configuration
Check if the provider has been initialized.
True if initialized, false otherwise
ProtectedmergeDeep-merge multiple objects. Arrays override completely, objects are recursively merged, primitives override. Used for merging provider defaults, model configurations, and runtime options.
Objects to merge
Deep-merged object
ProtectedregisterRegister a capability implementation. Called by concrete providers to declare support for a capability.
Capability key
Capability symbol
Implementation of the capability
Register a capability implementation. Called by concrete providers to declare support for a capability.
Capability symbol
Implementation of the capability
Abstract base class for all AI providers.
Provides shared helpers and state management for provider implementations.
Responsibilities:
Does not implement Provider directly, but is intended for extension.