Skip to content

Add Anthropic Claude and Azure OpenAI Provider SupportΒ #3

@mheadd

Description

@mheadd

Currently, the LLM provider abstraction system supports Ollama (local) and OpenAI providers. To expand the multi-provider capabilities, we need to implement support for Anthropic Claude and Azure OpenAI providers.

Current State

βœ… Ollama provider (fully implemented)
βœ… OpenAI provider (fully implemented)
🚧 Anthropic provider (marked as "Planned" in documentation)
🚧 Azure OpenAI provider (marked as "Planned" in documentation)

Proposed Implementation

Anthropic Claude Provider

  • Create api/providers/anthropic-provider.js extending the base provider interface
  • Support for Claude-3 models (haiku, sonnet, opus)
  • Environment variables: ANTHROPIC_API_KEY, ANTHROPIC_MODEL
  • Rate limiting and error handling specific to Anthropic's API

Azure OpenAI Provider

  • Create api/providers/azure-openai-provider.js extending the base provider interface
  • Support for GPT models deployed on Azure
  • Environment variables: AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, AZURE_OPENAI_DEPLOYMENT_NAME
  • Azure-specific authentication and endpoint handling

Environment Configuration

# Anthropic
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=your-anthropic-key
ANTHROPIC_MODEL=claude-3-haiku-20240307

# Azure OpenAI
LLM_PROVIDER=azure-openai
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_KEY=your-azure-key
AZURE_OPENAI_DEPLOYMENT_NAME=your-deployment-name

Acceptance Criteria

  • Both providers implement the base provider interface consistently
  • Provider factory correctly instantiates new providers
  • Environment configuration validation includes new providers
  • All persona endpoints work identically with new providers
  • Comprehensive test coverage for both providers
  • Documentation updated to reflect "Ready" status
  • Demo script supports testing new providers

Documentation Updates

  • Update supported providers table in README.md (change 🚧 Planned to βœ… Ready)
  • Add setup instructions for both providers
  • Update performance comparison table with new providers
  • Update .project-info.md with new provider information

Testing Requirements

  • Unit tests for provider implementations
  • Integration tests with mocked API responses
  • Error handling tests for provider-specific failures
  • Environment configuration validation tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions