FreeRide - Free AI for OpenClaw
What This Skill Does
Configures OpenClaw to use free AI models from OpenRouter. Sets the best free model as primary, adds ranked fallbacks so rate limits don't interrupt the user, and preserves existing config.
Prerequisites
Before running any FreeRide command, ensure:
- 1. OPENROUTERAPIKEY is set. Check with
echo $OPENROUTER_API_KEY. If empty, the user must get a free key at https://openrouter.ai/keys and set it:
CODEBLOCK0
- 2. The
freeride CLI is installed. Check with which freeride. If not found:
CODEBLOCK1
Primary Workflow
When the user wants free AI, run these steps in order:
CODEBLOCK2
That's it. The user now has free AI with automatic fallback switching.
Verify by telling the user to send /status to check the active model.
Commands Reference
| Command | When to use it |
|---|
| INLINECODE4 | User wants free AI set up (most common) |
| INLINECODE5 |
User wants fallbacks but wants to keep their current primary model |
|
freeride auto -c 10 | User wants more fallbacks (default is 5) |
|
freeride list | User wants to see available free models |
|
freeride list -n 30 | User wants to see all free models |
|
freeride switch <model> | User wants a specific model (e.g.
freeride switch qwen3-coder) |
|
freeride switch <model> -f | Add specific model as fallback only |
|
freeride status | Check current FreeRide configuration |
|
freeride fallbacks | Update only the fallback models |
|
freeride refresh | Force refresh the cached model list |
After any command that changes config, always run openclaw gateway restart.
What It Writes to Config
FreeRide updates only these keys in ~/.openclaw/openclaw.json:
- -
agents.defaults.model.primary — e.g. INLINECODE18 - INLINECODE19 — e.g. INLINECODE20
- INLINECODE21 — allowlist so
/model command shows the free models
Everything else (gateway, channels, plugins, env, customInstructions, named agents) is preserved.
The first fallback is always openrouter/free — OpenRouter's smart router that auto-picks the best available model based on the request.
Watcher (Optional)
For auto-rotation when rate limited, the user can run:
CODEBLOCK3
Troubleshooting
| Problem | Fix |
|---|
| INLINECODE24 | INLINECODE25 |
| INLINECODE26 |
User needs a key from https://openrouter.ai/keys |
| Changes not taking effect |
openclaw gateway restart then
/new for fresh session |
| Agent shows 0 tokens | Check
freeride status — primary should be
openrouter/<provider>/<model>:free |
FreeRide - OpenClaw的免费AI
此技能的功能
配置OpenClaw使用OpenRouter的免费AI模型。将最佳免费模型设为主模型,添加排序后的备用模型以防止速率限制中断用户使用,并保留现有配置。
前提条件
在运行任何FreeRide命令之前,请确保:
- 1. 已设置OPENROUTERAPIKEY。 使用echo $OPENROUTERAPIKEY检查。如果为空,用户必须在https://openrouter.ai/keys获取免费密钥并进行设置:
bash
export OPENROUTER
APIKEY=sk-or-v1-...
# 或持久化保存:
openclaw config set env.OPENROUTER
APIKEY sk-or-v1-...
- 2. 已安装freeride CLI。 使用which freeride检查。如果未找到:
bash
cd ~/.openclaw/workspace/skills/free-ride
pip install -e .
主要工作流程
当用户需要免费AI时,按顺序执行以下步骤:
bash
步骤1:配置最佳免费模型 + 备用模型
freeride auto
步骤2:重启网关,使OpenClaw应用更改
openclaw gateway restart
完成。用户现在拥有带自动备用切换功能的免费AI。
通过让用户发送/status检查当前活动模型进行验证。
命令参考
| 命令 | 使用场景 |
|---|
| freeride auto | 用户需要设置免费AI(最常见) |
| freeride auto -f |
用户需要备用模型但保留当前主模型 |
| freeride auto -c 10 | 用户需要更多备用模型(默认为5个) |
| freeride list | 用户想查看可用的免费模型 |
| freeride list -n 30 | 用户想查看所有免费模型 |
| freeride switch
| 用户想要特定模型(例如freeride switch qwen3-coder) |
| freeride switch -f | 仅将特定模型添加为备用模型 |
| freeride status | 检查当前FreeRide配置 |
| freeride fallbacks | 仅更新备用模型列表 |
| freeride refresh | 强制刷新缓存的模型列表 |
执行任何更改配置的命令后,始终运行openclaw gateway restart。
写入配置的内容
FreeRide仅更新~/.openclaw/openclaw.json中的以下键:
- - agents.defaults.model.primary — 例如openrouter/qwen/qwen3-coder:free
- agents.defaults.model.fallbacks — 例如[openrouter/free, nvidia/nemotron:free, ...]
- agents.defaults.models — 白名单,使/model命令显示免费模型
其他所有内容(网关、频道、插件、环境变量、自定义指令、命名代理)均保持不变。
第一个备用模型始终是openrouter/free——OpenRouter的智能路由器,可根据请求自动选择最佳可用模型。
监视器(可选)
为在速率限制时自动轮换,用户可以运行:
bash
freeride-watcher --daemon # 持续监控
freeride-watcher --rotate # 立即强制轮换
freeride-watcher --status # 检查轮换历史
故障排除
| 问题 | 解决方法 |
|---|
| freeride: command not found | cd ~/.openclaw/workspace/skills/free-ride && pip install -e . |
| OPENROUTERAPIKEY not set |
用户需要从https://openrouter.ai/keys获取密钥 |
| 更改未生效 | openclaw gateway restart然后/new开启新会话 |
| 代理显示0个令牌 | 检查freeride status——主模型应为openrouter//:free |