Providers¶
Perspt supports multiple LLM providers through the genai Rust client crate, which provides unified access to all major commercial, open-source, and cloud-provider model APIs.
Supported Providers and Adapters¶
Perspt accepts nine provider identifiers, each routed to the matching genai adapter (any other value is rejected as unsupported):
Provider / Adapter |
Adapter Kind ID |
Reference Model |
Notes |
|---|---|---|---|
OpenAI |
|
|
SOTA GPT-5.5, GPT-5-mini |
Anthropic |
|
|
Claude Fable, Opus 4.8, Sonnet 4.6, Haiku 4.6 |
Google Gemini |
|
|
Gemini 3.5 Flash, 3.1 Pro, 3.1 Flash-Lite |
Google Vertex AI |
|
|
Google Cloud Vertex platform |
Groq |
|
|
Ultra-low latency Llama/Gemma on LPU |
Cohere |
|
|
Command A+, North Mini Code |
xAI |
|
|
Grok 4 family |
DeepSeek |
|
|
DeepSeek v4 models (Chat, Coder) |
Ollama |
|
|
Local offline models |
Configuration Methods¶
1. Environment Variables (recommended):
export GEMINI_API_KEY="your-key"
perspt
2. CLI Flags:
perspt chat --model gpt-5.5
3. Config File (config.toml):
provider = "anthropic"
model = "claude-fable"
Agent mode can additionally bind several credentials and routes at once
through the [providers.<id>] and [models] tables, which hold
fully qualified provider::model routes for multi-route portfolios.
See Agent Mode for details.
Provider-Specific Notes¶
OpenAI
export OPENAI_API_KEY="sk-xxx"
perspt chat --model gpt-5.5
Azure OpenAI (via OpenAI Compatible)
Azure OpenAI requires configuring the base URL override and the API key:
export OPENAI_API_KEY="your-azure-key"
export OPENAI_BASE_URL="https://your-resource.openai.azure.com/openai/deployments/your-deployment"
perspt chat --model gpt-5.5
Anthropic
export ANTHROPIC_API_KEY="sk-ant-xxx"
perspt chat --model claude-fable
Google Gemini
export GEMINI_API_KEY="AIza..."
perspt chat --model gemini-3.5-flash
Google Vertex AI
Vertex AI requires your Google Cloud project ID and a location (optional, defaults to global). Authentication is typically handled via Google Application Default Credentials (ADC); setting VERTEX_API_KEY to a bearer token overrides the ADC token.
export VERTEX_PROJECT_ID="my-gcp-project-123"
export VERTEX_LOCATION="us-central1"
# Run using Vertex model prefix
perspt chat --model vertex::gemini-3.5-flash
Ollama (Local)
ollama serve
ollama pull llama3.3
perspt chat --model llama3.3
No API key required. Perspt auto-detects Ollama as the fallback provider.