Skip to content

LLM Providers

RsClaw supports 15 pre-configured LLM providers, plus any OpenAI-compatible API.

Pre-configured Providers

ProviderBase URLModels
Qwen (Alibaba)dashscope.aliyuncs.comqwen-turbo, qwen-plus, qwen-max
DeepSeekapi.deepseek.comdeepseek-chat, deepseek-reasoner
Kimi (Moonshot)api.moonshot.cnmoonshot-v1-8k/32k/128k
Zhipu (GLM)open.bigmodel.cnglm-4, glm-4v
MiniMaxapi.minimax.chatabab6.5
GateRouterapi.gaterouter.comMulti-model routing
OpenRouteropenrouter.ai/api100+ models
Anthropicapi.anthropic.comClaude 3/4 family
OpenAIapi.openai.comGPT-4o, o1, o3
Google Geminigenerativelanguage.googleapis.comGemini Pro/Ultra
xAI (Grok)api.x.aiGrok-2
Groqapi.groq.comLlama, Mixtral
SiliconFlowapi.siliconflow.cnVarious open models
Ollamalocalhost:11434Local models
Customuser-definedAny OpenAI-compatible API

Configuration

json5
{
  models: {
    providers: {
      qwen: {
        apiKey: "${DASHSCOPE_API_KEY}",
        baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1",
      },
      openai: {
        apiKey: "${OPENAI_API_KEY}",
      },
      custom_provider: {
        apiKey: "sk-xxx",
        baseUrl: "https://your-api.example.com/v1",
      },
    },
  },
  agents: {
    defaults: {
      model: {
        primary: "qwen/qwen-turbo",
        fallback: "openai/gpt-4o-mini",
      },
    },
  },
}

Auto-Registration

Providers are auto-registered from environment variables:

Env VarProvider
OPENAI_API_KEYOpenAI
ANTHROPIC_API_KEYAnthropic
DASHSCOPE_API_KEYQwen
DEEPSEEK_API_KEYDeepSeek
GOOGLE_API_KEYGemini

Features

  • Failover: automatic retry with exponential backoff
  • Model fallback chains: primary -> fallback -> image fallback
  • Thinking budget: configurable thinking level (low/medium/high)
  • Token tracking: per-session and per-agent usage
  • Vision auto-detect: auto-detect image-capable models

Released under MIT / Apache-2.0 License