Custom Providers
Extensions can register custom model providers viapi.registerProvider(). This enables:
- Proxies - Route requests through corporate proxies or API gateways
- Custom endpoints - Use self-hosted or private model deployments
- OAuth/SSO - Add authentication flows for enterprise providers
- Custom APIs - Implement streaming for non-standard LLM APIs
Where to go next
This page gets you to a first working provider extension. Each part of the job has its own page:- Override an existing provider — change a provider Atomic already ships.
- Multiple accounts for one provider — inherit provider behavior with separate logins.
- Register a provider — register and unregister a provider, and the API types it implements.
- Provider OAuth — login callbacks, credential storage, and dynamic catalog refresh.
- Provider streaming API — events, content blocks, tool calls, stop reasons, and usage.
- Provider API reference — provider config and model definition contracts.
Example Extensions
See these complete provider examples:Table of Contents
- Example Extensions
- Quick Reference
- Override Existing Provider
- Register New Provider
- Unregister Provider
- OAuth Support
- Custom Streaming API
- Testing Your Implementation
- Config Reference
- Model Definition Reference
Quick Reference
session_start. Atomic waits for the factory before startup continues, so the provider is available during interactive startup and to atomic --list-models.
Registering only baseUrl or headers for an existing provider preserves its built-in models. Supplying models in the legacy form replaces that provider’s models across chat, image, and classifier operations. An omitted type means "chat"; image and classifier models require explicit discriminants and implementations keyed by their api values through the images and classifiers fields.
For example, a mixed-operation provider can register non-chat models and their implementations together:
baseUrl values take precedence over the provider endpoint. If no models list is supplied, built-in models of every operation remain registered. Equal model IDs in different operations remain distinct, including their model-specific headers.
Every model needs an ID, display name, input capabilities, and cost metadata. Chat and classifier models also need a context window; chat models need an output limit and reasoning support; image models declare their output modalities. Choose the API implementation at the provider level unless one model requires an override.
Override Existing Provider
Moved to Override an existing provider.Register New Provider
Moved to Register a provider.Unregister Provider
Moved to Register a provider.API Types
Moved to Register a provider.Auth Header
Moved to Register a provider.OAuth Support
Moved to Provider OAuth.Dynamic model catalog refresh
Moved to Provider OAuth. A completeProvider calls context.publish({ update }) to install provider-owned model state, then exposes the latest list through getModels(). Legacy ProviderConfig.refreshModels returns mixed-operation model definitions that replace that registration’s live models.
OAuthLoginCallbacks
Moved to Provider OAuth.OAuthCredentials
Moved to Provider OAuth.Custom Streaming API
Moved to Provider streaming API.Stream Pattern
Moved to Provider streaming API.Event Types
Moved to Provider streaming API.Stop Reasons
Moved to Provider streaming API.Content Blocks
Moved to Provider streaming API.Tool Calls
Moved to Provider streaming API.Usage and Cost
Moved to Provider streaming API.Registration
Moved to Provider streaming API.Testing Your Implementation
Test your provider/model pairs against these behaviors. The filenames below are suggested test names, not a required test suite:
Run tests with your provider/model pairs to verify compatibility.