解放你的 OpenClaw
摘要
Hugging Face 提供了一份迁移指南,帮助你将 OpenClaw 智能体从受限的 Anthropic Claude 模型迁移到开源替代方案,可通过 Hugging Face Inference Providers 或借助 Llama.cpp 等工具在本地硬件上运行。
查看缓存全文
缓存时间: 2026/05/08 09:14
解放你的 OpenClaw
来源:https://huggingface.co/blog/liberate-your-openclaw 返回文章 (https://huggingface.co/blog)
- Hugging Face Inference Providers (https://huggingface.co/blog/liberate-your-openclaw#hugging-face-inference-providers)
- 本地部署 (https://huggingface.co/blog/liberate-your-openclaw#local-setup)
- 应该选择哪条路径? (https://huggingface.co/blog/liberate-your-openclaw#which-path-should-you-choose)
Anthropic 正在限制 Pro/Max 订阅用户在开放式智能体平台中对 Claude 模型的访问。不过别担心,Hugging Face 上有优秀的开源模型可以让你的智能体继续运行!而且大多数情况下,成本只是前者的一小部分。
如果你已经被切断连接,你的 OpenClaw、Pi 或 Open Code 智能体需要恢复生机,你可以通过两种方式将它们迁移到开源模型:
- 使用通过 Hugging Face Inference Providers 提供的开源模型。
- 在你自己的硬件上运行完全本地的开源模型。
托管路线是让你快速恢复功能强大智能体的最快方式。本地路线则适合那些注重隐私、希望零 API 成本并追求完全控制的用户。
要做到这一点,只需告诉你的 claude code、cursor 或你常用的智能体:帮我把我的 OpenClaw 智能体迁移到 Hugging Face 模型,并附上这个页面链接。
https://huggingface.co/blog/liberate-your-openclaw#hugging-face-inference-providersHugging Face Inference Providers
Hugging Face Inference Providers 是一个开放式平台,可以路由到开源模型的提供商。如果你想要最好的模型,或者没有必要的硬件,这就是正确的选择。
首先,你需要在这里创建一个 token (https://huggingface.co/settings/tokens)。然后你可以将这个 token 添加到 openclaw 中,如下所示:
openclaw onboard --auth-choice huggingface-api-key
在提示时粘贴你的 Hugging Face token,然后你会被要求选择一个模型。
我们推荐 GLM-5 (https://huggingface.co/zai-org/GLM-5),因为它在 Terminal Bench (https://huggingface.co/datasets/harborframework/terminal-bench-2.0) 上的出色表现,但这里有成千上万的模型可供选择 (https://huggingface.co/inference/models)。
你可以随时在 OpenClaw 配置中输入模型的 repo_id 来更新你的 Hugging Face 模型:
{ agents: { defaults: { model: { primary: "huggingface/zai-org/GLM-5:fastest" } } } }
注意:HF PRO 订阅用户每月可获得 $2 的免费额度,可用于 Inference Providers 的使用,了解更多请见这里 (https://huggingface.co/pro)。
https://huggingface.co/blog/liberate-your-openclaw#local-setup本地部署
在本地运行模型可以为你提供完全的隐私、零 API 成本,以及不受速率限制进行实验的能力。
安装 Llama.cpp,这是一个完全开源的低资源推理库。
``
mac 或 linux
brew install llama.cpp
windows
winget install llama.cpp ``
使用内置 Web UI 启动本地服务器:
llama-server -hf unsloth/Qwen3.5-35B-A3B-GGUF:UD-Q4_K_XL
这里我们使用的是 Qwen3.5-35B-A3B,它在 32GB RAM 下运行良好。如果你有不同的硬件需求,请查看你感兴趣模型的硬件兼容性 (https://huggingface.co/unsloth/Qwen3.5-35B-A3B-GGUF)。这里有成千上万的模型可供选择 (https://huggingface.co/models?pipeline_tag=text-generation&library=gguf&sort=trending)。
如果你在 llama.cpp 中加载了 GGUF,请使用如下 OpenClaw 配置:
openclaw onboard --non-interactive \ --auth-choice custom-api-key \ --custom-base-url "http://127.0.0.1:8080/v1" \ --custom-model-id "unsloth-qwen3.5-35b-a3b-gguf" \ --custom-api-key "llama.cpp" \ --secret-input-mode plaintext \ --custom-compatibility openai
验证服务器正在运行且模型已加载:
curl http://127.0.0.1:8080/v1/models
https://huggingface.co/blog/liberate-your-openclaw#which-path-should-you-choose应该选择哪条路径?
如果你想要最快捷的方式恢复功能强大的 OpenClaw 智能体,请使用 Hugging Face Inference Providers。如果你注重隐私、想要完全的本地控制并且不想支付 API 费用,请使用 llama.cpp。
无论哪种方式,你都无需依赖封闭的托管模型就能让 OpenClaw 重新运转起来!
相似文章
Anthropic 表示 OpenClaw 风格的 Claude CLI 使用方式再次获准
# Anthropic - OpenClaw 来源:[https://docs.openclaw.ai/providers/anthropic](https://docs.openclaw.ai/providers/anthropic) ## Anthropic (Claude) Anthropic 开发了 **Claude** 模型系列,并通过 API 和 Claude CLI 提供访问。在 OpenClaw 中,Anthropic API 密钥和 Claude CLI 重用都被支持。如果已配置,现有遗留的 Anthropic token 配置文件在运行时仍会被识别。 ## 选项 A:Anthropic API 密钥 **最佳适用场景:** 标准 API 访问和按用量计
从 OpenClaw 迁移
一份从 OpenClaw 迁移到 Hermes Agent 的指南,详细说明如何迁移角色、记忆、技能和配置文件,并提供预览、试运行和密钥迁移选项。
@nityeshaga:Claude Code 就是你早已拥有的 OpenClaw 替代品。过去三个月我一直在当面告诉人们这一点。现在……
一篇文章指出,Claude Code 是用户早已拥有的 OpenClaw 替代品,强调两者都是 AI 模型之上的调用工具,而 Claude Code 作为非程序员工具常被忽视。
我将 obra/superpowers 移植到了 OpenClaw — 无 Claude Code 依赖
一位开发者将 superpowers AI辅助开发框架移植到 OpenClaw,移除了 Claude Code 依赖,并使用原生代理和任务跟踪重新设计了工作流程。
我们使用本地模型免费对OpenClaw仓库进行问题分类!*
这篇博文介绍了在代理框架中使用Gemma、Qwen等本地开源权重模型,自动对OpenClaw仓库中的问题和拉取请求进行分类,从而实现实时通知,无需依赖昂贵的封闭API模型。