BoxLang AI 3.0 introduces a unified API supporting 17 AI providers (OpenAI, Claude, Gemini, Ollama, AWS Bedrock, and more) through a layered provider architecture. The design separates IAiService (interface), BaseService (HTTP transport and lifecycle), and OpenAIService (OpenAI-format logic), enabling provider switching via a single config change with no application code changes. A new capability system uses interface-based type checking to detect what each provider supports at compile time rather than runtime, preventing cryptic errors. The update also adds HuggingFace embeddings support, custom base URL overrides for proxies and self-hosted endpoints, a comprehensive event system for monitoring and multi-tenant billing, and a straightforward pattern for building custom providers.

7m read timeFrom foojay.io
Post cover image
Table of contents
The Full Provider MatrixThe Provider HierarchyIAiService — The Trimmed InterfaceThe Capability SystemBaseService — The Transport LayerProvider ConfigurationCustom Base URLsOllama — Local AI, Zero API CostNew in 3.0: HuggingFace EmbeddingsBuilding a Custom ProviderThe Event SystemSwitching Providers in PracticeWrapping Up the SeriesGet Started

Sort: