← 返回 Skills 市场
shaivpidadi

FreeRide -Gateway

作者 Shaishav Pidadi · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
42
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install freeride-gateway
功能描述
Use this skill when the user has FreeRide installed (binary at ~/.local/bin/freeride, gateway on http://localhost:11343) or asks how to route their AI worklo...
使用说明 (SKILL.md)

FreeRide

FreeRide is a local gateway running on http://localhost:11343. It accepts the OpenAI Chat Completions API and forwards to whichever free-tier provider the user has keys for, failing over across providers and keys when one rate limits or errors.

This skill teaches you (the agent) how to detect FreeRide, wire any OpenAI-shaped client against it, diagnose failures, and use its CLI.

Detect that FreeRide is running

In order, cheapest first:

  1. Health checkcurl -s http://localhost:11343/health. Returns {"ok": true, "version": "0.x.y", "providers": [...]} when up.
  2. Process checklsof -iTCP:11343 -sTCP:LISTEN -n -P 2>/dev/null or ss -tlnp | grep 11343 on Linux.
  3. Config presence~/.freeride/config.json exists (means FreeRide was installed even if not currently running).

The port 11343 is hard-coded — FreeRide refuses to auto-pick a different port because agent configs (Aider's OPENAI_API_BASE, Continue's apiBase, etc.) are written against this exact value.

Wire any OpenAI-shaped client against it

export OPENAI_API_BASE=http://localhost:11343/v1
export OPENAI_API_KEY=any

The API key value is irrelevant — FreeRide doesn't authenticate inbound requests; it uses the user's real provider keys (which it reads from env vars like OPENROUTER_API_KEY) for outbound calls. Setting any, unused, or any literal string works.

Python (openai SDK)

from openai import OpenAI
client = OpenAI(base_url="http://localhost:11343/v1", api_key="any")
resp = client.chat.completions.create(
    model="openrouter/free",  # or any model from /v1/models
    messages=[{"role": "user", "content": "hello"}],
)

curl

curl http://localhost:11343/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model": "openrouter/free", "messages": [{"role": "user", "content": "hi"}]}'

Streaming

"stream": true works. Server emits text/event-stream with data: {...} chunks and a final data: [DONE]. The first chunk is buffered until upstream confirms the stream is real — if upstream fails before the first chunk, FreeRide retries on the next provider/key transparently. After the first chunk has shipped, mid-stream errors propagate as a truncated stream.

Discover available models

curl http://localhost:11343/v1/models

Returns the OpenAI {"object": "list", "data": [...]} shape. Models from all configured providers appear in one flat list, deduped by id. Add ?refresh=true to bypass the 6h cache.

Identify which provider served a request

  • Non-streaming: response JSON includes _freeride_provider: "\x3Cname>".
  • Streaming: response includes X-FreeRide-Provider: \x3Cname> header.

Useful for debugging: if completions seem off-tone or off-spec, check this field to know whether a fallback kicked in.

CLI reference

freeride serve                  # start gateway on localhost:11343
freeride bind \x3Cagent>           # write gateway URL into agent config
freeride list                   # list available free models, ranked
freeride status                 # show OpenClaw config + cache age (v2)
freeride auto                   # auto-configure OpenClaw (v2)
freeride rotate                 # swap primary if it fails (v2)
freeride telemetry [on|off]     # manage telemetry beacon
freeride-watcher                # background daemon, rotates on failure

freeride bind supports: aider, continue, hermes, openclaw. It writes the agent's config atomically and preserves unrelated keys. After bind, the agent works without further user steps.

Provider env-var setup

Provider Env var(s) Notes
OpenRouter OPENROUTER_API_KEY Most-tested provider
Groq GROQ_API_KEY Hardcoded free-tier allowlist
NVIDIA NIM NVIDIA_API_KEY Curated allowlist
Cloudflare Workers AI CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID Account ID is part of URL
HuggingFace HF_TOKEN (or HUGGINGFACE_API_KEY) $0.10/mo Free, $2/mo PRO budget

Multi-key rotation is supported — pass keys as a JSON array:

export OPENROUTER_API_KEY='["sk-or-v1-key1","sk-or-v1-key2"]'

When key 1 hits 429, FreeRide cools it for 120s and uses key 2 next. Cooldowns persist across restarts (~/.freeride/cooldown.json).

Troubleshooting

Symptom Likely cause Fix
503 from gateway All (provider, key) pairs failed Check freeride list for which providers have usable keys; check upstream provider status
command not found: freeride after install Console-script not on PATH Use python -m freeride as fallback, or add ~/.local/bin to PATH
First-run banner spam Telemetry disclosure (one-time) Run freeride telemetry off to opt out
No providers configured No env vars set Set at least one provider key (see table above)
httpx.HTTPStatusError import error Old install with httpx 1.0.dev3 Upgrade FreeRide; v0.3.0a3+ pins httpx>=0.27,\x3C1

Failover semantics (for diagnosing why a request went where)

Per request, FreeRide walks (provider, key) pairs in registration order. For each pair:

  • RATE_LIMIT or AUTH → mark this key cooling for 120s, advance keys within the same provider.
  • MODEL_NOT_FOUND → skip remaining keys for this provider, advance to the next provider (other keys of the same provider won't help).
  • QUOTA_EXHAUSTED → advance providers (same as MODEL_NOT_FOUND).
  • 5xx / UNAVAILABLE → advance pair.
  • OK → ship the response, stamp the provider header.

Once the first chunk of a streaming response has shipped, mid-stream upstream errors propagate as a truncated stream — they do NOT trigger failover (the client has already started receiving content).

Telemetry

On by default. Hourly POST to https://telemetry.free-ride.xyz/v1/beacon with {installation_id, version, os, tokens_served, request_count, providers_active, uptime_hours}. Never sent: prompts, completions, model IDs, API keys, hostnames, IPs.

Opt out: freeride telemetry off.

When the user reports "FreeRide isn't working"

  1. curl -s http://localhost:11343/health — is it running?
  2. curl -s http://localhost:11343/v1/models | jq '.data | length' — does it know about any models? (zero usually means no provider keys.)
  3. Check freeride list — does it surface usable models per provider?
  4. Echo provider env vars — env | grep -E '(OPENROUTER|GROQ|NVIDIA|CLOUDFLARE|HF)_'.
  5. If a 503 hits during a request, the _freeride_provider field or X-FreeRide-Provider header on the failed attempt's response (if any) tells you who was last tried.

Links

安全使用建议
Review this before installing or invoking it. If you use it, verify the FreeRide binary source, keep the gateway local-only, use limited provider keys, approve any config-writing command yourself, and be aware that your prompts may be sent to whichever configured provider FreeRide selects.
功能分析
Type: OpenClaw Skill Name: freeride-gateway Version: 1.0.0 The skill describes a local LLM gateway ('FreeRide') that manages API keys and routes traffic to various providers. It includes several high-risk indicators: a recommended 'curl | sh' installation method (api.free-ride.xyz/install.sh), a CLI command ('freeride bind') that programmatically modifies the configuration files of other AI agents (e.g., Aider, Continue), and a default-on telemetry beacon that sends usage data to an external endpoint (telemetry.free-ride.xyz). While these features are functionally consistent with the tool's stated purpose, the combination of automated configuration modification and external data reporting warrants a suspicious classification.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose—routing OpenAI-compatible clients through a local FreeRide gateway—is coherent, but it necessarily sends prompts to third-party AI providers and uses the user's provider API keys.
Instruction Scope
The skill tells the agent how to detect and wire clients to FreeRide and documents `freeride bind`/`freeride auto` commands that can modify agent configuration, without explicit approval or rollback guidance.
Install Mechanism
There is no install spec or reviewed code; the skill depends on an already-installed `freeride` binary/gateway from an unknown source, so the actual credential-handling implementation is outside the provided artifacts.
Credentials
FreeRide is described as accepting any inbound API key while using real provider credentials from environment variables for outbound calls, which is high-impact access even though it is purpose-aligned.
Persistence & Privilege
The documentation mentions persistent cooldown state, agent config writes, telemetry controls, and a background watcher daemon; these are disclosed but should be user-approved before use.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install freeride-gateway
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /freeride-gateway 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of freeride-gateway skill. - Enables detection and usage of FreeRide as a local OpenAI-compatible gateway for routing AI workloads across multiple free-tier providers. - Offers setup, configuration, and troubleshooting guides, including environment variable requirements for each provider. - Provides instructions for integrating with OpenAI-compatible clients and model discovery. - Details automatic failover strategies across providers and API keys. - Includes reference for CLI usage, streaming support, and telemetry management. - Troubleshooting section helps diagnose common setup and runtime issues.
元数据
Slug freeride-gateway
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

FreeRide -Gateway 是什么?

Use this skill when the user has FreeRide installed (binary at ~/.local/bin/freeride, gateway on http://localhost:11343) or asks how to route their AI worklo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 42 次。

如何安装 FreeRide -Gateway?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install freeride-gateway」即可一键安装,无需额外配置。

FreeRide -Gateway 是免费的吗?

是的,FreeRide -Gateway 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

FreeRide -Gateway 支持哪些平台?

FreeRide -Gateway 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 FreeRide -Gateway?

由 Shaishav Pidadi(@shaivpidadi)开发并维护,当前版本 v1.0.0。

💬 留言讨论