← 返回
未分类 Key 中文

FastRouter Setup

Add the FastRouter AI provider to OpenClaw with all available text and vision models, fetched live from the FastRouter API. Use when: (1) a user wants to set...
将 FastRouter AI 提供者添加到 OpenClaw,支持所有可用的文本和视觉模型,实时从 FastRouter API 获取。适用场景:(1) 用户想要设置...
vamsimnet
未分类 clawhub v1.2.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 359
下载
💾 0
安装
1
版本
#latest

概述

FastRouter Setup

Add the FastRouter AI provider to OpenClaw with all available text and vision models using only built-in tools (no script execution required).

Inputs

  • API Key (required): Starts with sk-v1- followed by a hex string. If not provided, ask for it.
  • Base URL (optional): Defaults to https://api.fastrouter.ai

Steps

1. Extract the API key

Parse the API key from the user's message. It starts with sk-v1-.

If no API key is found, ask the user for it. Do NOT proceed without one.

2. Fetch models

Use web_fetch to get the model list:

web_fetch url="https://api.fastrouter.ai/v1/models" extractMode="text"

3. Filter models

From the response JSON, keep only models where:

  • is_active is true
  • architecture.output_modalities includes "text"
  • architecture.input_modalities includes "text" or "image"

For each qualifying model, extract:

  • id — the model identifier
  • context_length — context window size
  • top_provider.max_completion_tokens — max output tokens (if 0 or missing, use min(context_length, 8192))
  • Input types: list of "text" and/or "image" from input_modalities

4. Build provider config

Construct the provider object (do NOT include a "name" key — OpenClaw rejects it):

{
  "baseUrl": "https://api.fastrouter.ai",
  "api": "openai-completions",
  "apiKey": "THE_API_KEY",
  "models": [
    {
      "id": "model/id",
      "name": "Display Name",
      "contextWindow": 128000,
      "maxTokens": 8192,
      "input": ["text", "image"],
      "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0},
      "reasoning": false
    }
  ]
}

5. Update openclaw.json

Use read to load ~/.openclaw/openclaw.json.

Merge the provider into models.providers.fastrouter, preserving all other config.

Also add model references to agents.defaults.models — for each model, add:

"fastrouter/MODEL_ID": {}

Use write to save the updated config.

6. Restart gateway

openclaw gateway restart

This is the only step requiring user approval.

7. Report to user

Tell the user:

  • How many models were added
  • They can switch models with /model fastrouter/MODEL_ID
  • Suggest popular models (claude, gpt, gemini, deepseek variants)

Error Handling

  • API unreachable: Tell the user the FastRouter API may be down, try again later
  • No qualifying models: Warn that no text/image models were found
  • Config file missing: Create the full structure from scratch
  • Invalid API key format: Ask the user to double-check their key

Notes

  • Provider key is fastrouter
  • Existing fastrouter config will be replaced with fresh model list
  • All other providers and settings are preserved
  • Cost is set to zero (FastRouter handles billing separately)
  • Video-only and audio-only models are excluded

版本历史

共 1 个版本

  • v1.2.0 当前
    2026-05-07 07:09 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,531
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358 📥 318,360
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,824