Provider configuration including the Anthropic client instance.
An LlmProvider ready to be passed to evaluate().
import Anthropic from '@anthropic-ai/sdk'
import { createAnthropicProvider, evaluate } from 'rageval'
const provider = createAnthropicProvider({
type: 'anthropic',
client: new Anthropic(),
model: 'claude-haiku-4-5-20251001',
temperature: 0, // recommended for reproducible evaluation
retries: 3,
})
Creates an Anthropic (Claude) LLM provider for use with evaluate.
Automatically retries transient errors (rate limits, server errors) with exponential back-off. The retry logic checks the SDK's typed
.statusproperty before falling back to string matching, making it robust to SDK version changes.