Skip to main content

Variable: anthropic

const anthropic: (modelId, config?) => ModelConfig & object

Defined in: packages/core/src/providers/factories.ts:89

Anthropic (Claude). The API key defaults to ANTHROPIC_API_KEY.

Type Declaration​

models​

models: (config?) => Promise<ModelInfo[]>

List the Anthropic models the configured key can see, newest-first.

Parameters​

config?​

ProviderConfig

Returns​

Promise<ModelInfo[]>

Example​

With reasoning

const bot = new Baleybot({
model: anthropic('claude-sonnet-5', {
apiKey: 'sk-ant-...',
reasoning: { effort: 'high' }
})
});