Overview
Features
| Feature | Description | Supported Providers |
|---|---|---|
| Multi-Provider | Unified interface for OpenAI, Anthropic, OpenRouter, custom | All |
| Chat Completion | Standard text conversations | All |
| Streaming | Real-time response streaming | All |
| Image Analysis | Vision capabilities with images | OpenAI-compatible |
| Conversation Management | Maintain chat history with context | All |
| Retry Logic | Automatic retries with exponential backoff | All |
| Comprehensive Logging | Debug and monitoring support | All |
| Type Safety | Full TypeScript support | All |
Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ AIModel │ │ ProviderRegistry │ │ ConfigManager │
│ (Main Class) │───▶│ (Provider Config)│───▶│ (Global Config) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │ │
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Logger │ │ Message │ │ Request │
│ (Logging) │ │ (Chat History) │ │ (API Calls) │
└─────────────────┘ └──────────────────┘ └─────────────────┘Source captured: 2026-10-11