How to Run OpenClaw with Open-Source Models

· Source: Towards Data Science · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering, Robotics & Autonomous Systems · Depth: Intermediate, medium

Summary

Anthropic recently banned using Claude Code subscriptions for OpenClaw, forcing users to rely on the more expensive Claude Opus 4.6 API, priced at $5 (input) and $25 (output) per million tokens. This prompted a search for cheaper alternatives, with OpenAI's GPT-5.4 proving "lazy." The article explores Chinese open-source LLMs like Kimi-K2.5, GLM-5.1, and MiniMax-M2.7 as viable options. Kimi-K2.5, available via OpenRouter for approximately 0.6/3 USD per million tokens (about 1/10th the cost of Claude Opus 4.6), is highlighted for its performance. The setup involves obtaining an API key from OpenRouter and configuring OpenClaw, ensuring all previous Anthropic references are removed to avoid OAuth issues. While Kimi-K2.5 is slightly slower than Claude Opus 4.6, its overall performance is comparable, making it a strong cost-effective competitor.

Key takeaway

For AI Engineers and ML Directors seeking to reduce operational costs for OpenClaw assistants, migrating from Claude Opus 4.6 to open-source alternatives like Kimi-K2.5 offers substantial savings. While Kimi-K2.5 might exhibit slower response times for simple queries, its overall performance is competitive, making it a viable choice. Be mindful of GDPR compliance if using Chinese models via API for sensitive data, or consider self-hosting for full control.

Key insights

Cost-effective open-source LLMs like Kimi-K2.5 can power OpenClaw effectively, despite minor performance trade-offs.

Principles

Method

To integrate Kimi-K2.5 with OpenClaw, obtain an API key from OpenRouter, configure OpenClaw via Claude Code, and crucially, remove all prior Anthropic API keys and environment variable references to prevent OAuth issues.

In practice

Topics

Best for: AI Engineer, Machine Learning Engineer, Director of AI/ML

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Towards Data Science.