Overview
Goose supports two approaches to adding custom providers:- Declarative Providers - JSON configuration files for OpenAI/Anthropic/Ollama-compatible APIs
- Rust Implementation - Full
Providertrait implementation for custom logic
Declarative Providers
Declarative providers let you add OpenAI-compatible APIs without writing Rust code. They’re perfect for:- Commercial API providers (Together, Groq, Fireworks, etc.)
- Self-hosted LLM servers (vLLM, text-generation-inference)
- OpenRouter and other aggregator services
- Custom proxy endpoints
Provider Engines
Choose the engine that matches your API format:openai- OpenAI Chat Completions API formatanthropic- Anthropic Messages API formatollama- Ollama API format
Configuration Structure
Configuration Fields
string
required
Unique identifier for the provider (auto-generated from display_name)
string
required
API format:
openai, anthropic, or ollamastring
required
Human-readable name shown in UIs
string
Optional description of the provider
string
Environment variable name for the API key (required if
requires_auth is true)string
required
Base URL of the API endpoint
array
required
List of available models with their context limits
boolean
default:"true"
Whether the provider requires authentication
boolean
default:"true"
Whether the provider supports streaming responses
number
default:"600"
Request timeout in seconds
object
Optional custom headers to include in requests
string
Optional API path (defaults based on engine)
Creating Custom Providers
Method 1: Configuration File
Create a JSON file in~/.config/goose/custom_providers/:
Method 2: Programmatic Creation (Rust)
Example Providers
Together.ai
Fireworks.ai
OpenRouter
Self-Hosted vLLM
Anthropic-Compatible Provider
For providers using Anthropic’s API format:Managing Custom Providers
List Providers
Update Provider
Delete Provider
Refresh Providers
After adding/removing provider files:Advanced Configuration
Custom Headers
Add provider-specific headers:Base Path Customization
Override the default API path:No Authentication
For providers that don’t require auth:Multiple Model Configurations
Implementing Provider Trait (Advanced)
For full control, implement theProvider trait: