Quick Start
How It Works
Environment Variables
| Variable | Purpose | Precedence |
|---|---|---|
OPENAI_BASE_URL | LLM endpoint URL (highest priority) | 1 |
OPENAI_API_BASE | LLM endpoint URL (legacy compat) | 2 |
OLLAMA_API_BASE | Ollama endpoint URL | 3 |
MODEL_NAME | Model name (highest priority) | 1 |
OPENAI_MODEL_NAME | Model name (legacy compat) | 2 |
OPENAI_API_KEY | API key (no fallback) | — |
Defaults
| Setting | Default Value |
|---|---|
| Model | gpt-4o-mini |
| Base URL | https://api.openai.com/v1 |
| API Key | None |
Common Patterns
Run against Ollama
- bash
- python
Run against a corporate OpenAI proxy
- bash
- python
Use Azure OpenAI / Bedrock via LiteLLM
- bash
- python
User Interaction Flow
Best Practices
Set OPENAI_BASE_URL, not OPENAI_API_BASE
Set OPENAI_BASE_URL, not OPENAI_API_BASE
OPENAI_BASE_URL is the standard OpenAI SDK environment variable and has the highest precedence. Use this for all new configurations rather than the legacy OPENAI_API_BASE.Empty string ≠ unset
Empty string ≠ unset
An empty string value is skipped during resolution, and the next variable in precedence order is tried. To disable a variable, unset it completely rather than setting it to an empty string.
Use .env files for local dev
Use .env files for local dev
Create a Load it in your Python code:
.env file in your project root for local development:Realtime/WebSocket endpoints
Realtime/WebSocket endpoints
For realtime features, WebSocket URLs are auto-derived from HTTP URLs. The system automatically:
- Converts
https://towss:// - Strips
/v1suffix to avoid/v1/v1/realtime - Appends the appropriate realtime path
OPENAI_BASE_URL - the realtime endpoint is handled automatically.Related
LLM Configuration
Complete LLM configuration options
Models
Supported models and providers

