Models
MushroomAgent connects to LLM providers through the llm section in config.yaml. It supports OpenAI and any OpenAI-compatible API.
Basic config
llm:
api_type: "openai"
api_key: "sk-..."
base_url: "https://api.openai.com/v1"
model: "gpt-5.2"
The API key can also be set via the environment variable LLM_API_KEY — it will be used if api_key is empty in config.
Key parameters
| Field | Default | Description |
|---|---|---|
api_type | — | Set to openai |
api_key | — | API key |
base_url | — | API endpoint URL |
model | — | Model name |
temperature | 0.0 | Sampling temperature (0-2) |
max_completion_tokens | 4096 | Maximum output tokens |
stream | false | Enable streaming responses |
timeout | 600 | Request timeout in seconds |
OpenAI-compatible providers
Any service that exposes an OpenAI-compatible API works — just change base_url:
| Service | base_url |
|---|---|
| OpenAI | https://api.openai.com/v1 |
| Azure OpenAI | Your Azure endpoint |
| Ollama (local) | http://localhost:11434/v1 |
| Any OpenAI-compatible service | Provider-specific |
To use Anthropic Claude, Google Gemini, or other non-OpenAI models, use a proxy service that provides an OpenAI-compatible adapter (e.g., One API, LiteLLM).
Realtime voice models
For voice mode, a separate realtime_llm section configures the streaming model:
realtime_llm:
model: "gpt-realtime"
api_key: "YOUR_REALTIME_API_KEY" # falls back to llm.api_key
Embedding models
For memory and retrieval, configure the embedding section:
embedding:
api_type: "openai"
api_key: ""
base_url: "https://api.openai.com/v1"
model: "text-embedding-3-small"
dimensions: 1536
Supported embedding types: openai (and OpenAI-compatible), dashscope.
Reference
For all available fields, see Configuration Reference.