openclaw免费大模型配置方案
免费大模型配置方案。
·
免费大模型配置方案
方案A:GitHub Copilot(最推荐)
# 1. 认证GitHub Copilot(需GitHub学生包)
openclaw models auth login-github-copilot
# 2. 设置默认模型
openclaw models set github-copilot/claude-sonnet-4.6
# 可用免费模型:
# - github-copilot/claude-sonnet-4.6(日常对话)
# - github-copilot/claude-haiku-4.5(快速响应)
# - github-copilot/gpt-4o(代码任务)
方案B:国内免费API组合
编辑~/.openclaw/openclaw.json:
{
"env": {
"BAILIAN_API_KEY": "sk-你的阿里云百炼密钥",
"VOLC_API_KEY": "sk-你的火山方舟密钥"
},
"agents": {
"defaults": {
"model": {
"primary": "bailian/qwen-turbo",
"fallbacks": [
"volcengine/glm-4-7",
"openrouter/openrouter/free"
]
}
}
},
"models": {
"providers": {
"bailian": {
"baseUrl": "https://dashscope.aliyun.com/compatible-mode/v1",
"apiKey": "${BAILIAN_API_KEY}",
"models": [{"id": "qwen-turbo"}]
},
"volcengine": {
"baseUrl": "https://ark.cn-beijing.volces.com/api/v3",
"apiKey": "${VOLC_API_KEY}",
"models": [{"id": "glm-4-7"}]
}
}
}
}
方案C:国际免费API链
{
"env": {
"GROQ_API_KEY": "gsk-你的Groq密钥",
"OPENROUTER_API_KEY": "sk-or-你的OpenRouter密钥"
},
"agents": {
"defaults": {
"model": {
"primary": "openrouter/openrouter/free",
"fallbacks": ["groq/gpt-oss-120b"]
}
}
}
}
方案D:本地Ollama(完全免费)
# 1. 安装Ollama
brew install ollama
# 2. 运行Qwen2模型
ollama run qwen2:7b
# 3. 配置OpenClaw使用本地模型
openclaw config set models.providers.ollama.baseUrl "http://localhost:11434/v1"
openclaw config set agents.defaults.model.primary "ollama/qwen2:7b"
免费API获取地址:
-
阿里云百炼:https://bailian.console.aliyun.com(新用户100万tokens)
-
火山方舟:https://console.volcengine.com/ark(新用户50万tokens)
-
硅基流动:https://account.siliconflow.cn(新用户2000万tokens)
-
Groq:https://console.groq.com(每日免费额度)
-
OpenRouter:https://openrouter.ai(免费路由)
-
GitHub Copilot:学生认证免费
更多推荐



所有评论(0)