[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"article-how-to-run-openclaw-with-open-source-models-en":3,"tags-how-to-run-openclaw-with-open-source-models-en":35,"related-lang-how-to-run-openclaw-with-open-source-models-en":46,"related-posts-how-to-run-openclaw-with-open-source-models-en":50,"series-ai-agent-a62c627d-73cd-484d-b0d2-e8da92f6c59b":87},{"id":4,"title":5,"content":6,"summary":7,"source":8,"source_url":9,"author":10,"image_url":11,"keywords":12,"language":19,"translated_content":10,"views":20,"is_premium":21,"created_at":22,"updated_at":22,"cover_image":11,"published_at":23,"rewrite_status":24,"rewrite_error":10,"rewritten_from_id":25,"slug":26,"category":27,"related_article_id":28,"status":29,"google_indexed_at":30,"x_posted_at":10,"tweet_text":10,"title_rewritten_at":10,"title_original":10,"key_takeaways":31,"topic_cluster_id":10,"embedding":10,"is_canonical_seed":21},"a62c627d-73cd-484d-b0d2-e8da92f6c59b","How to Run OpenClaw with Open-Source Models","\u003Cp data-speakable=\"summary\">Set up \u003Ca href=\"\u002Ftag\u002Fopenclaw\">OpenClaw\u003C\u002Fa> with open-source \u003Ca href=\"\u002Ftag\u002Fllms\">LLMs\u003C\u002Fa> like Kimi-K2.5 through OpenRouter.\u003C\u002Fp>\u003Cp>This guide is for developers who want to replace \u003Ca href=\"\u002Ftag\u002Fclaude\">Claude\u003C\u002Fa>-based OpenClaw setups with cheaper open-source models and keep the assistant useful. After following the steps, you will have OpenClaw configured with Kimi-K2.5 or a similar model, with \u003Ca href=\"\u002Ftag\u002Fanthropic\">Anthropic\u003C\u002Fa> references removed and a basic optimization checklist in place.\u003C\u002Fp>\u003Cp>You will also know where the main tradeoffs are: lower cost, model flexibility, possible latency, and compliance limits if you use hosted APIs outside your region.\u003C\u002Fp>\u003Ch2>Before you start\u003C\u002Fh2>\u003Cul>\u003Cli>An existing OpenClaw setup or a fresh OpenClaw project\u003C\u002Fli>\u003Cli>Node 20+ and a working terminal\u003C\u002Fli>\u003Cli>An OpenRouter account and API key\u003C\u002Fli>\u003Cli>Access to a model such as Kimi-K2.5 or GLM-5.1\u003C\u002Fli>\u003Cli>Claude Code or the tool you use to edit OpenClaw configuration\u003C\u002Fli>\u003Cli>Any old Anthropic API keys or environment variables you can remove\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>Step 1: Create an OpenRouter key\u003C\u002Fh2>\u003Cp>Your first outcome is a valid API key that can authenticate OpenClaw requests to an alternative model provider. In the source article, OpenRouter is the easiest bridge because it exposes multiple models and makes it simple to switch between them.\u003C\u002Fp>\n\u003Cfigure class=\"my-6\">\u003Cimg src=\"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1777975843199-wtuz.png\" alt=\"How to Run OpenClaw with Open-Source Models\" class=\"rounded-xl w-full\" loading=\"lazy\" \u002F>\u003C\u002Ffigure>\n\u003Cp>Sign in to OpenRouter, open the API key page, and create a new key for your workspace. Keep the key handy for your shell profile or secret manager so OpenClaw can read it at runtime.\u003C\u002Fp>\u003Cpre>\u003Ccode>export OPENROUTER_API_KEY=\"your-openrouter-key\"\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see the key available in your terminal session, and OpenRouter should accept test requests from the account dashboard.\u003C\u002Fp>\u003Ch2>Step 2: Point OpenClaw at Kimi-K2.5\u003C\u002Fh2>\u003Cp>Your next outcome is an OpenClaw configuration that sends model calls to Kimi-K2.5 instead of Claude. This is the core migration step, and it is usually a small config change once the API key is in place.\u003C\u002Fp>\n\u003Cfigure class=\"my-6\">\u003Cimg src=\"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1777975837617-i18h.png\" alt=\"How to Run OpenClaw with Open-Source Models\" class=\"rounded-xl w-full\" loading=\"lazy\" \u002F>\u003C\u002Ffigure>\n\u003Cp>Update the model name in your OpenClaw settings, then let \u003Ca href=\"\u002Fnews\u002Fwhy-claude-code-should-use-deepseek-v4-for-1m-context-en\">Claude Code\u003C\u002Fa> or your preferred editor rewrite the assistant configuration if needed. If you are using OpenRouter, select the Kimi-K2.5 model identifier from its catalog and wire it into the assistant’s provider settings.\u003C\u002Fp>\u003Cp>You should see OpenClaw start making requests to Kimi-K2.5 and return normal assistant responses instead of Anthropic errors.\u003C\u002Fp>\u003Ch2>Step 3: Remove Anthropic references\u003C\u002Fh2>\u003Cp>Your outcome here is a clean environment that no longer leaks old Claude-specific settings. The article notes that leftover Anthropic references can trigger OAuth issues even after you switch the primary model.\u003C\u002Fp>\u003Cp>Search your environment variables, shell profile, and project config for Anthropic keys, endpoints, or provider names. Remove any stale values, then restart the shell or application so the new environment is the only one in effect.\u003C\u002Fp>\u003Cpre>\u003Ccode>unset ANTHROPIC_API_KEY\nunset ANTHROPIC_BASE_URL\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see OpenClaw start without OAuth conflicts, and the assistant should no longer try to authenticate against Anthropic services.\u003C\u002Fp>\u003Ch2>Step 4: Tune permissions and task skills\u003C\u002Fh2>\u003Cp>Your outcome is an assistant that can actually complete work instead of stalling on missing access. The article recommends giving the model the permissions and task-specific \u003Ca href=\"\u002Ftag\u002Fskills\">skills\u003C\u002Fa> it needs so it can act independently.\u003C\u002Fp>\u003Cp>Review the services OpenClaw must reach, then add the right API keys and access rules for each integration. If your workflow depends on repo access, issue tracking, or external APIs, make those capabilities explicit in the assistant setup.\u003C\u002Fp>\u003Cp>You should see fewer back-and-forth prompts from the model and more one-shot task completion on routine work.\u003C\u002Fp>\u003Ch2>Step 5: Add memory and review jobs\u003C\u002Fh2>\u003Cp>Your final outcome is an assistant that improves over time instead of forgetting prior chats. The source article recommends cron jobs that review chats and feed useful context back into the assistant.\u003C\u002Fp>\u003Cp>Schedule a daily job that summarizes recent conversations, extracts reusable patterns, and updates whatever memory store OpenClaw uses. Keep the review narrow so it captures decisions, recurring failures, and task-specific lessons without polluting the assistant with noise.\u003C\u002Fp>\u003Cp>You should see the assistant reuse prior context more effectively on the next day’s tasks, especially for repeated workflows.\u003C\u002Fp>\u003Cp>The tradeoff summary is straightforward: hosted open-source models can be much cheaper than Claude Opus, but some may be slower on simple prompts and may not fit regulated data workflows if you rely on external APIs. If you need stronger compliance, self-hosting an open-source model is the next layer to explore.\u003C\u002Fp>\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Metric\u003C\u002Fth>\u003Cth>Before\u002FBaseline\u003C\u002Fth>\u003Cth>After\u002FResult\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Model cost per million tokens\u003C\u002Ftd>\u003Ctd>Claude Opus 4.6 at $5 input \u002F $25 output\u003C\u002Ftd>\u003Ctd>Kimi-K2.5 at about $0.6 input \u002F $3 output\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Relative price\u003C\u002Ftd>\u003Ctd>Baseline Claude pricing\u003C\u002Ftd>\u003Ctd>About 1\u002F10th the cost\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Provider flexibility\u003C\u002Ftd>\u003Ctd>Single Anthropic subscription path\u003C\u002Ftd>\u003Ctd>Multiple models through OpenRouter\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003Ch2>Common mistakes\u003C\u002Fh2>\u003Cul>\u003Cli>Leaving Anthropic keys in your environment. Fix: remove old \u003Ccode>ANTHROPIC_*\u003C\u002Fcode> variables and restart your shell before testing.\u003C\u002Fli>\u003Cli>Switching the model name but not the provider config. Fix: verify the assistant points to the new API endpoint and model identifier.\u003C\u002Fli>\u003Cli>Using hosted models for sensitive customer data. Fix: either avoid regulated data or self-host the open-source model in your own environment.\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>What's next\u003C\u002Fh2>\u003Cp>Once OpenClaw is running on an open-source model, the next step is to benchmark your own tasks, compare Kimi-K2.5 with GLM or MiniMax, and decide whether hosted APIs or self-hosting gives you the best mix of cost, latency, and compliance.\u003C\u002Fp>","Set up OpenClaw with open-source LLMs like Kimi-K2.5 through OpenRouter.","towardsdatascience.com","https:\u002F\u002Ftowardsdatascience.com\u002Fhow-to-run-openclaw-with-open-source-models\u002F",null,"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1777975843199-wtuz.png",[13,14,15,16,17,18],"OpenClaw","Kimi-K2.5","OpenRouter","open-source LLMs","Claude Code","agent workflows","en",1,false,"2026-05-05T10:10:24.244006+00:00","2026-05-05T10:10:24.16+00:00","done","23489ac1-e08d-40a7-8c64-288c2edf77eb","how-to-run-openclaw-with-open-source-models-en","ai-agent","175e98d3-10c5-4bc8-85a6-e77fd5ae3700","published","2026-05-06T09:00:22.321+00:00",[32,33,34],"OpenClaw can run on open-source models through OpenRouter with minimal config changes.","Old Anthropic environment variables can cause OAuth issues after migration.","Task permissions, memory jobs, and model choice matter more than raw model switching.",[36,38,40,42,44],{"name":15,"slug":37},"openrouter",{"name":14,"slug":39},"kimi-k25",{"name":17,"slug":41},"claude-code",{"name":13,"slug":43},"openclaw",{"name":16,"slug":45},"open-source-llms",{"id":28,"slug":47,"title":48,"language":49},"how-to-run-openclaw-with-open-source-models-zh","怎麼用開源模型跑 OpenClaw","zh",[51,57,63,69,75,81],{"id":52,"slug":53,"title":54,"cover_image":55,"image_url":55,"created_at":56,"category":27},"fda44d24-7baf-4d91-a7f9-bbfecae20a27","switch-ai-outputs-markdown-to-html-en","How to Switch AI Outputs from Markdown to HTML","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1778743249827-wmsr.png","2026-05-14T07:20:22.631724+00:00",{"id":58,"slug":59,"title":60,"cover_image":61,"image_url":61,"created_at":62,"category":27},"064275f5-4282-47c3-8e4a-60fe8ac99246","anthropic-cat-wu-proactive-ai-assistants-en","Anthropic’s Cat Wu on proactive AI assistants","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1778735465548-a92i.png","2026-05-14T05:10:31.723441+00:00",{"id":64,"slug":65,"title":66,"cover_image":67,"image_url":67,"created_at":68,"category":27},"423ac8ad-2886-42a9-8dd8-78e5d43a1574","how-to-run-hermes-agent-on-discord-en","How to Run Hermes Agent on Discord","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1778724656141-i30t.png","2026-05-14T02:10:35.727086+00:00",{"id":70,"slug":71,"title":72,"cover_image":73,"image_url":73,"created_at":74,"category":27},"776a562c-99a6-4a6b-93a0-9af40300f3f2","why-ragflow-is-the-right-open-source-rag-engine-to-self-host-en","Why RAGFlow is the right open-source RAG engine to self-host","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1778674254587-0pxn.png","2026-05-13T12:10:25.721583+00:00",{"id":76,"slug":77,"title":78,"cover_image":79,"image_url":79,"created_at":80,"category":27},"322ec8bc-61d3-4c80-bb9e-a19941e137c6","how-to-add-temporal-rag-in-production-en","How to Add Temporal RAG in Production","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1778667085221-0mox.png","2026-05-13T10:10:31.619892+00:00",{"id":82,"slug":83,"title":84,"cover_image":85,"image_url":85,"created_at":86,"category":27},"1c09aef7-24bc-4d3a-b6cb-426b1012f432","github-agentic-workflows-ai-github-actions-en","GitHub Agentic Workflows puts AI agents in Actions","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1778551887736-7b7l.png","2026-05-12T02:11:07.184824+00:00",[88,93,98,103,108,113,118,123,128,133],{"id":89,"slug":90,"title":91,"created_at":92},"03db8de8-8dc2-4ac1-9cf7-898782efbb1f","anthropic-claude-ai-agent-task-automation-en","Anthropic's Claude AI Agent: A New Era of Task Automation","2026-03-25T16:25:06.513026+00:00",{"id":94,"slug":95,"title":96,"created_at":97},"045d1abc-190d-4594-8c95-91e2a26f0c5a","googles-2026-ai-agent-report-decoded-en","Google’s 2026 AI Agent Report, Decoded","2026-03-26T11:15:23.046616+00:00",{"id":99,"slug":100,"title":101,"created_at":102},"e64aba21-254b-4f93-aa21-837484bb52ec","kimi-k25-review-stronger-still-not-legend-en","Kimi K2.5 review: stronger, still not a legend","2026-03-27T07:15:55.385951+00:00",{"id":104,"slug":105,"title":106,"created_at":107},"30dfb781-a1b2-4add-aebe-b3df40247c37","claude-code-controls-mac-desktop-en","Claude Code now controls your Mac desktop","2026-03-28T03:01:59.384091+00:00",{"id":109,"slug":110,"title":111,"created_at":112},"254405b6-7833-4800-8e13-f5196deefbe6","cloudflare-100x-faster-ai-agent-sandbox-en","Cloudflare’s 100x Faster AI Agent Sandbox","2026-03-28T03:09:44.356437+00:00",{"id":114,"slug":115,"title":116,"created_at":117},"04f29b7f-9b91-4306-89a7-97d725e6e1ba","openai-backs-isara-agent-swarm-bet-en","OpenAI backs Isara’s agent-swarm bet","2026-03-28T03:15:27.849766+00:00",{"id":119,"slug":120,"title":121,"created_at":122},"3b0bf479-e4ae-4703-9666-721a7e0cdb91","openai-plan-automated-ai-researcher-en","OpenAI’s plan for an automated AI researcher","2026-03-28T03:17:42.312819+00:00",{"id":124,"slug":125,"title":126,"created_at":127},"fe91bce0-b85d-4efa-a207-24ae9939c29f","harness-engineering-ai-agent-reliability-2026","Harness Engineering: From Bridle to Operating System, The Missing Link in AI Agent Reliability","2026-03-31T06:36:55.648751+00:00",{"id":129,"slug":130,"title":131,"created_at":132},"67dc66da-ca46-4aa5-970b-e997a39fe109","openai-codex-plugin-claude-code-en","OpenAI puts Codex inside Claude Code","2026-04-01T09:21:55.381386+00:00",{"id":134,"slug":135,"title":136,"created_at":137},"7a09007d-820f-43b3-8607-8ad1bfcb94c8","mcp-explained-from-prompts-to-production-en","MCP Explained: From Prompts to Production","2026-04-01T09:24:40.089177+00:00"]