Adding a Provider
VoiceGateway uses a provider registry pattern that makes adding new providers straightforward. Each provider is a single Python file that extendsBaseProvider. This guide walks through the full process.
Prerequisites
- Development environment set up
- Familiarity with the provider’s API (SDK, auth, pricing)
- Account with the provider for testing
10-step checklist
1. Create the provider file
Createsrc/voicegateway/providers/<name>_provider.py. Use an existing provider as a template (e.g., deepgram_provider.py for STT, cartesia_provider.py for TTS).
2. Implement the BaseProvider ABC
TheBaseProvider abstract class in src/voicegateway/providers/base.py requires four methods:
| Method | Purpose | Return type |
|---|---|---|
create_stt(model, **kwargs) | Create an STT plugin instance | LiveKit STT plugin or None |
create_llm(model, **kwargs) | Create an LLM plugin instance | LiveKit LLM plugin or None |
create_tts(model, voice, **kwargs) | Create a TTS plugin instance | LiveKit TTS plugin or None |
health_check() | Verify provider connectivity | bool |
self._unsupported("modality_name") to raise a clear error.
Pricing is not a provider-level concern. LLM, STT, and TTS rates all resolve via voice-prices (the wrappers live at src/voicegateway/pricing/{llm,stt,tts}.py). To add pricing for a new model, see step 4.
3. Register the provider
Add your provider to the registry insrc/voicegateway/core/registry.py:
4. Add pricing data
Pricing for every modality (LLM, STT, TTS) resolves throughvoice-prices, so there is no VoiceGateway-side catalog entry to add. Confirm the model id resolves with the matching wrapper:
None, the model is not yet in voice-prices. Add it upstream in voice-prices (each entry carries prices_checked and pricing_source_url), publish a new voice-prices version, and bump the pin in pyproject.toml. Self-hosted models (local/*, ollama/*) price at $0 automatically and need no entry.
5. Add optional dependency
Add a new extra inpyproject.toml:
6. Add fake API key to test fixtures
Insrc/voicegateway/tests/conftest.py, add the key to the _test_env fixture:
7. Write tests
Createsrc/voicegateway/tests/test_<name>_provider.py:
8. Update documentation
Add the provider to relevant documentation pages:docs/guide/what-is-voicegateway.md— provider listdocs/guide/installation.md— extras tabledocs/configuration/— config exampleREADME.md— provider count and list
9. Test the full flow
10. Open a PR
Create a PR with:- Title:
feat(providers): add <Provider Name> support - Description: what modalities are supported, link to provider docs, pricing source
- Checklist: all items from the contributing guide
Example: anatomy of an existing provider
Looking at the registry, VoiceGateway ships with these 11 providers:| Provider | Module | Class | Modalities |
|---|---|---|---|
| openai | openai_provider | OpenAIProvider | STT, LLM, TTS |
| deepgram | deepgram_provider | DeepgramProvider | STT, TTS |
| anthropic | anthropic_provider | AnthropicProvider | LLM |
| groq | groq_provider | GroqProvider | STT, LLM |
| cartesia | cartesia_provider | CartesiaProvider | TTS |
| elevenlabs | elevenlabs_provider | ElevenLabsProvider | TTS |
| assemblyai | assemblyai_provider | AssemblyAIProvider | STT |
| ollama | ollama_provider | OllamaProvider | LLM |
| whisper | whisper_provider | WhisperProvider | STT |
| kokoro | kokoro_provider | KokoroProvider | TTS |
| piper | piper_provider | PiperProvider | TTS |