provider-implementation
Provider Implementation
Checklist
- Implement the full interface (ChatModel, Embedder, VectorStore, STT, TTS, etc.).
- Register via
init()with parent package'sRegister(). - Map provider errors to
core.Errorwith correct ErrorCode. - Support context cancellation.
- Include token/usage metrics where applicable.
- Compile-time check:
var _ Interface = (*Impl)(nil). - Unit tests with mocked HTTP responses (httptest).
File Structure
llm/providers/openai/
├── openai.go # Implementation + New() + init()
├── stream.go # Streaming
├── errors.go # Error mapping
More from lookatitude/beluga-ai
go-framework
Go framework design patterns for Beluga AI v2. Use when designing package structure, registries, lifecycle, or creating new packages.
12go-interfaces
Go interface design with registry, middleware, and hooks for Beluga AI v2. Use when creating interfaces, extension contracts, or adding hooks/middleware.
8streaming-patterns
Go 1.23 iter.Seq2 streaming patterns for Beluga AI v2. Use when implementing streaming, transforms, or backpressure.
8doc-writing
Documentation writing patterns for Beluga AI v2. Use when creating package docs, tutorials, API guides, or teaching-oriented content.
7website-development
Website development patterns for the Beluga AI v2 documentation site. Use when building, styling, or adjusting website components, layouts, pages, and interactive elements — NOT for writing documentation content.
3go-testing
Go testing patterns for Beluga AI v2. Use when writing tests, mocks, or benchmarks.
2