详情

首页手游攻略 FreeRide:面向 Openclaw Skills 的自动化免费 AI 模型管理工具

FreeRide:面向 Openclaw Skills 的自动化免费 AI 模型管理工具

佚名 2026-08-10 09:20:02
下载入口:https://github.com/openclaw/skills/tree/main/skills/shaivpidadi/free-ride

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install free-ride

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 <project>/skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 free-ride。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

什么是 FreeRide?

FreeRide 是一款专门设计的技能,旨在优化 OpenClaw 生态系统中免费大语言模型的使用。通过直接与 OpenRouter 集成,它可以识别当前可用的最高质量免费模型,并将其配置为 AI 智能体的主驱动或回退驱动。对于希望保持持续、零成本开发流程且不愿受手动切换模型困扰的开发者来说,这项技能至关重要。

该工具通过实施分级回退系统来专注于可靠性。如果特定模型遇到速率限制,系统会自动将请求重定向到下一个最佳的可用免费模型。这确保了您的 Openclaw Skills 即使在大负载使用或供应商限制下也能保持响应,使高质量的 AI 辅助更加触手可及且符合预算。

FreeRide 应用场景

  • 希望通过利用 OpenRouter 的免费模型来消除 API 成本的开发者。
  • 经常遇到速率限制并需要自动化回退机制的用户。
  • 测试不同免费 LLM 在特定编码或研究任务中表现的团队。
  • 在不需要付费订阅的情况下,需要 AI 智能体保持高可用性的场景。
FreeRide 工作原理
  1. 该工具查询 OpenRouter 以获取所有当前可用免费 AI 模型的实时列表。
  2. 它根据质量基准和当前的延迟或可用性数据对这些模型进行排序。
  3. 运行自动配置命令后,它会修改中央配置文件以设置主免费模型。
  4. 它在配置中填充回退数组,以处理来自单个供应商的潜在速率限制错误。
  5. 重启网关后,AI 智能体会通过优化后的免费模型栈无缝路由请求。

FreeRide 配置指南

要开始使用此 Openclaw Skills 扩展,请执行以下步骤:

  1. 设置您的 OpenRouter API 密钥:
export OPENROUTER_API_KEY="your-api-key-here"
  1. 进入技能目录并安装 CLI:
cd ~/.openclaw/workspace/skills/free-ride
pip install -e .
  1. 初始化自动配置:
freeride auto
  1. 重启网关以应用更改:
openclaw gateway restart

FreeRide 数据架构与分类体系

FreeRide 在 ~/.openclaw/openclaw.json 文件中管理配置状态。它更新以下特定的元数据键:

描述
agents.defaults.model.primary 当前选择的最佳免费模型(例如 openrouter/qwen/qwen3-coder:free)。
agents.defaults.model.fallbacks 当主模型失败时使用的优先级备份模型列表。
agents.defaults.models 允许列表,使 /model 命令能够识别免费供应商。
name: freeride
description: Manages free AI models from OpenRouter for OpenClaw. Automatically ranks models by quality, configures fallbacks for rate-limit handling, and updates openclaw.json. Use when the user mentions free AI, OpenRouter, model switching, rate limits, or wants to reduce AI costs.

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. OPENROUTER_API_KEY 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:

    export OPENROUTER_API_KEY="sk-or-v1-..."
    # Or persist it:
    openclaw config set env.OPENROUTER_API_KEY "sk-or-v1-..."
    
  2. The freeride CLI is installed. Check with which freeride. If not found:

    cd ~/.openclaw/workspace/skills/free-ride
    pip install -e .
    

Primary Workflow

When the user wants free AI, run these steps in order:

# Step 1: Configure best free model + fallbacks
freeride auto

# Step 2: Restart gateway so OpenClaw picks up the changes
openclaw gateway restart

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
freeride auto User wants free AI set up (most common)
freeride auto -f 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. openrouter/qwen/qwen3-coder:free
  • agents.defaults.model.fallbacks — e.g. ["openrouter/free", "nvidia/nemotron:free", ...]
  • agents.defaults.models — 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:

freeride-watcher --daemon    # Continuous monitoring
freeride-watcher --rotate    # Force rotate now
freeride-watcher --status    # Check rotation history

Troubleshooting

Problem Fix
freeride: command not found cd ~/.openclaw/workspace/skills/free-ride && pip install -e .
OPENROUTER_API_KEY not set 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
点击查看更多
推荐专题
热门阅读