rageval - v0.1.1
    Preparing search index...

    Function createAnthropicProvider

    • 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 .status property before falling back to string matching, making it robust to SDK version changes.

      Parameters

      Returns LlmProvider

      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,
      })