Skip to main content

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

FieldDefaultDescription
api_typeSet to openai
api_keyAPI key
base_urlAPI endpoint URL
modelModel name
temperature0.0Sampling temperature (0-2)
max_completion_tokens4096Maximum output tokens
streamfalseEnable streaming responses
timeout600Request timeout in seconds

OpenAI-compatible providers

Any service that exposes an OpenAI-compatible API works — just change base_url:

Servicebase_url
OpenAIhttps://api.openai.com/v1
Azure OpenAIYour Azure endpoint
Ollama (local)http://localhost:11434/v1
Any OpenAI-compatible serviceProvider-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.