Skip to main content

LLM Providers

MushroomAgent supports multiple LLM providers. All providers use the same llm configuration block in config.yaml. For any provider not listed below, it defaults to OpenAI-compatible mode.

OpenAI

llm:
api_type: "openai"
api_key: "sk-..."
base_url: "https://api.openai.com/v1"
model: "gpt-5.2"

The default provider. Most services with OpenAI-compatible APIs also work by changing base_url.

Models that use OpenAI's Responses API can use api_type: "openai_responses".

DeepSeek

llm:
api_type: "deepseek"
api_key: "sk-..."
base_url: "https://api.deepseek.com"
model: "deepseek-chat"

Uses native DeepSeek API protocol.

Anthropic (Claude)

llm:
api_type: "anthropic"
api_key: "sk-ant-..."
model: "claude-sonnet-4-20250514"

api_type: "claude" is also accepted as an alias for "anthropic".

Tip

Anthropic does not provide an OpenAI-compatible endpoint natively. To use Claude models, either set api_type: "anthropic" directly or use a proxy service that exposes an OpenAI-compatible adapter (see below).

Other registered providers

The following api_type values are registered in the provider system:

api_typeProviderNotes
fireworksFireworks AIOpenAI-compatible
open_llmOpenLLMOpenAI-compatible
moonshotMoonshot AIOpenAI-compatible
mistralMistral AIOpenAI-compatible
yiYi (01.AI)OpenAI-compatible
geminiGoogle GeminiUses native Gemini API
zhipuaiZhipuAIGLM models
sparkSpark (iFlytek)Spark API
qianfanQianfan (Baidu)Baidu BCE
azureAzure OpenAIRequires api_version and base_url
mushroomMushroomAgentInternal routing

Using an OpenAI-compatible proxy

For providers without native support, use a proxy service that provides an OpenAI-compatible adapter:

  • One API — multi-provider OpenAI-compatible proxy
  • LiteLLM — LLM proxy with OpenAI-compatible API
  • Ollama — local LLM with OpenAI-compatible API
llm:
api_type: "openai"
api_key: "sk-..."
base_url: "http://localhost:11434/v1" # Ollama example
model: "llama3"

Embedding providers

For the embedding section in config.yaml:

api_typeProvider
openaiOpenAI / OpenAI-compatible
dashscopeAlibaba Cloud DashScope