Variable: anthropic
constanthropic: (modelId,config?) =>ModelConfig&object
Defined in: packages/core/src/providers/factories.ts:174
Configure Anthropic (Claude) provider explicitly
Type Declaration
models
models: (
config?) =>Promise<ModelInfo[]>
List the Anthropic models the configured key can see, newest-first.
Parameters
config?
Returns
Promise<ModelInfo[]>
Param
Anthropic model ID (e.g., 'claude-3-5-sonnet', 'claude-3-opus', 'claude-3-7-sonnet')
Param
Optional configuration (provider settings + reasoning options)
Returns
ModelConfig with provider set to 'anthropic'
Examples
const bot = new Baleybot({
model: anthropic('claude-3-5-sonnet')
});
const bot = new Baleybot({
model: anthropic('claude-3-5-sonnet', {
apiKey: 'sk-ant-...'
})
});
const bot = new Baleybot({
model: anthropic('claude-3-7-sonnet', {
reasoning: {
effort: 'high', // Automatically uses 20000 budget tokens
summary: 'detailed'
}
})
});