Agent skill

Add Newcli Provider

by LeoYeAI in LeoYeAI/openclaw-master-skills

为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入 Claude 或 GPT 模型的场景。包含 provider…

MITAuto-check passed

Install Add Newcli Provider

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills add-newcli-provider --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/add-newcli-provider .claude/skills/add-newcli-provider && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-newcli-provider
GitHub stars
2.2k
Token cost
~4.9k tokens
SKILL.md length
830 words
Files
3
Skills in repo
1,235
Repo updated
First seen
Licence
MIT

At a glance

为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入 Claude 或 GPT 模型的场景。包含 provider…

  • SKILL.md covers 前置条件, 第一步:确认可用模型, 第二步:添加 Provider and 第三步:配置别名, plus 3 more sections
  • Calls curl and python3; reaches code.newcli.com; needs API_KEY

What it does

Add Newcli Provider is an agent skill from LeoYeAI/openclaw-master-skills. 为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入 Claude 或 GPT 模型的场景。包含 provider 注册、模型定义、别名配置、fallback 链接入和验证的完整流程。当管理员说想"加 Claude"、"加 GPT"、"配 newcli"、"加 fox 源"、"接入 Claude 模型"、"接入 GPT 模型"、"加 codex"、"加 aws 线路"时使用此 skill。

Its SKILL.md is about 4.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `README.md` and `_meta.json`).

It works with Amazon Web Services and OpenAI. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.

Example prompts

  • “加 Claude”
  • “配 newcli”
  • “加 fox 源”
  • “/add-newcli-provider”

Requirements

  • A credential in API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • code.newcli.com

    Also links to:

    • foxcode.rjj.cc

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Newcli Provider loads about 4.9k tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 830 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~4.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 830 words, ~4,853 tokens.

Download SKILL.mdSave it as .claude/skills/add-newcli-provider/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
add-newcli-provider
description
为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入 Claude 或 GPT 模型的场景。包含 provider 注册、模型定义、别名配置、fallback 链接入和验证的完整流程。当管理员说想"加 Claude"、"加 GPT"、"配 newcli"、"加 fox 源"、"接入 Claude 模型"、"接入 GPT 模型"、"加 codex"、"加 aws 线路"时使用此 skill。

配置 NewCLI Provider(code.newcli.com 模型代理源)

NewCLI (FoxCode) 是一个模型代理服务,通过统一的账户和 API Key 提供三类模型的访问:

Provider模型系列API 协议Base URL备注
newcliClaude (Anthropic)anthropic-messagescode.newcli.com/claude主线路
newcli-awsClaude (Anthropic)anthropic-messagescode.newcli.com/claude/aws⭐ AWS 特价线路,消耗 1/24
newcli-codexGPT (OpenAI)openai-completionscode.newcli.com/codex/v1
newcli-geminiGemini (Google)google-generative-aicode.newcli.com/gemini/v1beta

为什么是四个 provider? 虽然是同一个服务商、同一个 API Key,但:

  • Claude、GPT、Gemini 使用不同的 API 协议和端点,必须分开
  • Claude 有两条线路(主线路 vs AWS 特价线路),消耗倍率不同,也需要分开配置
⭐ AWS 特价线路(重要)

服务商提供了独家 AWS 线路:https://code.newcli.com/claude/aws

对比主线路 (newcli)AWS 线路 (newcli-aws)
Base URL.../claude.../claude/aws
额度消耗1x1/24x (同样额度可用 24 倍)
模型相同相同
API 协议相同相同
API Key相同相同

策略:所有重要任务优先使用 newcli-aws,主线路 newcli 作为备用。

⚠️ 服务商声明:严禁分发 AWS 线路地址,发现封禁不退款。

如果觉得这个 Skill 有用,请用我的邀请码注册: https://foxcode.rjj.cc/auth/register?aff=7WTAV8R


前置条件

你需要从 NewCLI 服务获取以下信息:

项目说明
API Key格式为 sk-ant-oat01-... 的密钥(三个 provider 共用同一个)
可用模型列表向服务商确认,或查看账户统计页

注意:NewCLI 的 /v1/models 接口有 Cloudflare 防护,无法通过 curl 直接获取模型列表。请以账户后台的实际统计为准,不要依赖文档中的"支持列表"——文档列出的模型不一定全部对你的账户开放。


第一步:确认可用模型

这一步不能跳过。 不要把文档里列的模型全加上去,要以实际能调通的为准。

1A. 测试 Claude 模型(newcli / newcli-aws)

用 Anthropic messages 格式测试:

bash
# 测试主线路
curl -s --max-time 15 https://code.newcli.com/claude/v1/messages \
  -H "x-api-key: <你的API_KEY>" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"<MODEL_ID>","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'

# 测试 AWS 特价线路
curl -s --max-time 15 https://code.newcli.com/claude/aws/v1/messages \
  -H "x-api-key: <你的API_KEY>" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"<MODEL_ID>","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'

注意:baseUrl 中主线路写 /claude,AWS 线路写 /claude/aws(OpenClaw 自动拼接 /v1/messages)。

如果返回正常的 JSON 响应(含 content)= 可用。 如果返回 {"error":{"message":"暂不支持"}} 或 "未开放" = 该模型不可用。

1B. 测试 GPT 模型(newcli-codex)

用 OpenAI completions 格式测试:

bash
curl -s --max-time 15 https://code.newcli.com/codex/v1/chat/completions \
  -H "Authorization: Bearer <你的API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"model":"<MODEL_ID>","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'

如果返回正常的 JSON 响应(含 choices)= 可用。 如果返回错误或超时 = 该模型不可用。

1C. 测试 Gemini 模型(newcli-gemini)

用 Google Generative AI 格式测试:

bash
curl -s --max-time 15 \
  "https://code.newcli.com/gemini/v1beta/models/<MODEL_ID>:generateContent" \
  -H "x-goog-api-key: <你的API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"role":"user","parts":[{"text":"hi"}]}]}'

注意:Gemini 端点的 URL 格式与 Claude/GPT 不同——模型名嵌入在 URL 路径中,而不是请求体中。

如果返回正常的 JSON 响应(含 candidates)= 可用。 如果返回 {"error":{"message":"模型未开放"}} = 该模型不可用。

已知可用模型(截至 2026-02-08)
Claude 系列(newcli)
模型 ID名称Context说明
claude-opus-4-6Claude Opus 4.6200K最强,适合复杂任务
claude-haiku-4-5-20251001Claude Haiku 4.5200K轻量快速,适合简单任务

其他模型如 claude-sonnet-4-20250514 等在文档中列出但实测可能返回"未开放",以你账户的实际情况为准。

GPT 系列(newcli-codex)
模型 ID名称Context说明
gpt-5.3-codexGPT-5.3 Codex128K最新版本
gpt-5.2GPT-5.2128K基础版
gpt-5.2-codexGPT-5.2 Codex128K代码增强版
gpt-5.1GPT-5.1128K基础版
gpt-5.1-codexGPT-5.1 Codex128K代码增强版
gpt-5.1-codex-miniGPT-5.1 Codex Mini128K轻量版
gpt-5.1-codex-maxGPT-5.1 Codex Max128K增强版
gpt-5GPT-5128K基础版
gpt-5-codexGPT-5 Codex128K代码增强版
Gemini 系列(newcli-gemini)— 文本对话模型
模型 ID名称Contextreasoning说明
gemini-3-proGemini 3 Pro1M✅最新旗舰
gemini-3-pro-highGemini 3 Pro High1M✅旗舰增强版
gemini-3-pro-previewGemini 3 Pro Preview1M✅预览版
gemini-3-flashGemini 3 Flash1M❌快速版
gemini-3-flash-previewGemini 3 Flash Preview1M❌快速预览版
gemini-2.5-proGemini 2.5 Pro1M✅上一代旗舰
gemini-2.5-flashGemini 2.5 Flash1M❌上一代快速版
gemini-2.5-flash-liteGemini 2.5 Flash Lite1M❌轻量版
Gemini 系列(newcli-gemini)— 图片生成模型

这些模型用于生成图片,不要加入 fallback 链,但可以通过 /model 命令手动切换使用。

基础分辨率(默认):

模型 ID说明
gemini-3-pro-image默认比例
gemini-3-pro-image-3x2横向 3:2
gemini-3-pro-image-2x3纵向 2:3
gemini-3-pro-image-3x4纵向 3:4
gemini-3-pro-image-4x3横向 4:3
gemini-3-pro-image-4x5纵向 4:5
gemini-3-pro-image-5x4横向 5:4
gemini-3-pro-image-9x16竖屏 9:16
gemini-3-pro-image-16x9宽屏 16:9
gemini-3-pro-image-21x9超宽 21:9

2K 分辨率: 模型 ID 加 -2k 前缀,如 gemini-3-pro-image-2k、gemini-3-pro-image-2k-16x9 等。

4K 分辨率: 模型 ID 加 -4k 前缀,如 gemini-3-pro-image-4k、gemini-3-pro-image-4k-16x9 等。

⚠️ 图片生成模型不要加入 fallback 链——它们不适合文本对话,放进 fallback 会导致对话请求被错误路由到图片生成模型。需要生图时通过 /model gemini-3-pro-image 手动切换。


第二步:添加 Provider

在 ~/.openclaw/openclaw.json 的 models.providers 下添加三个 provider。

2A. 添加 newcli(Claude 主线路)
json
"newcli": {
  "baseUrl": "https://code.newcli.com/claude",
  "apiKey": "<你的API_KEY>",
  "api": "anthropic-messages",
  "authHeader": true,
  "models": [
    {
      "id": "claude-opus-4-6",
      "name": "Claude Opus 4.6",
      "reasoning": false,
      "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 200000,
      "maxTokens": 8192
    },
    {
      "id": "claude-haiku-4-5-20251001",
      "name": "Claude Haiku 4.5",
      "reasoning": false,
      "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 200000,
      "maxTokens": 8192
    }
  ]
}
2B. 添加 newcli-aws(Claude AWS 特价线路)⭐
json
"newcli-aws": {
  "baseUrl": "https://code.newcli.com/claude/aws",
  "apiKey": "<你的API_KEY>",
  "api": "anthropic-messages",
  "authHeader": true,
  "models": [
    {
      "id": "claude-opus-4-6",
      "name": "Claude Opus 4.6 (AWS)",
      "reasoning": false,
      "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 200000,
      "maxTokens": 8192
    },
    {
      "id": "claude-haiku-4-5-20251001",
      "name": "Claude Haiku 4.5 (AWS)",
      "reasoning": false,
      "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 200000,
      "maxTokens": 8192
    }
  ]
}

与 newcli 的唯一区别:baseUrl 从 .../claude 变为 .../claude/aws。模型列表、API Key、协议完全相同。 推荐:重要 Agent(如运维、评审)优先使用 newcli-aws,主线路 newcli 作为备用。

2C. 添加 newcli-codex(GPT 系列)
json
"newcli-codex": {
  "baseUrl": "https://code.newcli.com/codex/v1",
  "apiKey": "<你的API_KEY>",
  "api": "openai-completions",
  "models": [
    {
      "id": "gpt-5.3-codex", "name": "GPT-5.3 Codex",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    },
    {
      "id": "gpt-5.2", "name": "GPT-5.2",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    },
    {
      "id": "gpt-5.2-codex", "name": "GPT-5.2 Codex",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    },
    {
      "id": "gpt-5.1", "name": "GPT-5.1",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    },
    {
      "id": "gpt-5.1-codex", "name": "GPT-5.1 Codex",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    },
    {
      "id": "gpt-5.1-codex-mini", "name": "GPT-5.1 Codex Mini",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    },
    {
      "id": "gpt-5.1-codex-max", "name": "GPT-5.1 Codex Max",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    },
    {
      "id": "gpt-5", "name": "GPT-5",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    },
    {
      "id": "gpt-5-codex", "name": "GPT-5 Codex",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 128000, "maxTokens": 8192
    }
  ]
}
2D. 添加 newcli-gemini(Gemini 系列)
json
"newcli-gemini": {
  "baseUrl": "https://code.newcli.com/gemini/v1beta",
  "apiKey": "<你的API_KEY>",
  "api": "google-generative-ai",
  "models": [
    {
      "id": "gemini-3-pro", "name": "Gemini 3 Pro",
      "reasoning": true, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 1000000, "maxTokens": 65536
    },
    {
      "id": "gemini-3-pro-high", "name": "Gemini 3 Pro High",
      "reasoning": true, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 1000000, "maxTokens": 65536
    },
    {
      "id": "gemini-3-pro-preview", "name": "Gemini 3 Pro Preview",
      "reasoning": true, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 1000000, "maxTokens": 65536
    },
    {
      "id": "gemini-3-flash", "name": "Gemini 3 Flash",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 1000000, "maxTokens": 65536
    },
    {
      "id": "gemini-3-flash-preview", "name": "Gemini 3 Flash Preview",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 1000000, "maxTokens": 65536
    },
    {
      "id": "gemini-2.5-pro", "name": "Gemini 2.5 Pro",
      "reasoning": true, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 1000000, "maxTokens": 65536
    },
    {
      "id": "gemini-2.5-flash", "name": "Gemini 2.5 Flash",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 1000000, "maxTokens": 65536
    },
    {
      "id": "gemini-2.5-flash-lite", "name": "Gemini 2.5 Flash Lite",
      "reasoning": false, "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 1000000, "maxTokens": 65536
    }
  ]
}
四个 provider 的关键差异
参数newcli (Claude)newcli-aws (Claude AWS)newcli-codex (GPT)newcli-gemini (Gemini)
baseUrl.../claude.../claude/aws.../codex/v1.../gemini/v1beta
apianthropic-messagesanthropic-messagesopenai-completionsgoogle-generative-ai
authHeadertruetrue默认(Bearer)默认(x-goog-api-key)
apiKey相同相同相同相同
额度消耗1x1/24x ⭐1x1x
contextWindow200K200K128K1M
maxTokens81928192819265536
只添加你确认可用的模型

错误做法:把文档里所有模型都堆上去 正确做法:只添加第一步中测试通过的模型

添加不存在的模型不会导致崩溃,但 fallback 到它时会浪费一次请求超时,影响响应速度。


第三步:配置别名

在 agents.defaults.models 下为新模型添加别名,方便在聊天中用短名切换:

json
{
  "agents": {
    "defaults": {
      "models": {
        "newcli/claude-opus-4-6": { "alias": "claude-opus" },
        "newcli/claude-haiku-4-5-20251001": { "alias": "claude-haiku" },
        "newcli-aws/claude-opus-4-6": { "alias": "claude-opus-aws" },
        "newcli-aws/claude-haiku-4-5-20251001": { "alias": "claude-haiku-aws" },
        "newcli-codex/gpt-5.3-codex": { "alias": "gpt53" },
        "newcli-codex/gpt-5.2": { "alias": "gpt52" },
        "newcli-codex/gpt-5.2-codex": { "alias": "gpt52codex" },
        "newcli-codex/gpt-5.1": { "alias": "gpt51" },
        "newcli-codex/gpt-5.1-codex": { "alias": "gpt51codex" },
        "newcli-codex/gpt-5.1-codex-mini": { "alias": "gpt51mini" },
        "newcli-codex/gpt-5.1-codex-max": { "alias": "gpt51max" },
        "newcli-codex/gpt-5": { "alias": "gpt5" },
        "newcli-codex/gpt-5-codex": { "alias": "gpt5codex" },
        "newcli-gemini/gemini-3-pro": { "alias": "gemini3pro" },
        "newcli-gemini/gemini-3-pro-high": { "alias": "gemini3prohigh" },
        "newcli-gemini/gemini-3-pro-preview": { "alias": "gemini3preview" },
        "newcli-gemini/gemini-3-flash": { "alias": "gemini3flash" },
        "newcli-gemini/gemini-3-flash-preview": { "alias": "gemini3flashpreview" },
        "newcli-gemini/gemini-2.5-pro": { "alias": "gemini25pro" },
        "newcli-gemini/gemini-2.5-flash": { "alias": "gemini25flash" },
        "newcli-gemini/gemini-2.5-flash-lite": { "alias": "gemini25lite" }
      }
    }
  }
}

配置后用户可以在聊天中用 /model claude-opus、/model gpt53、/model gemini3pro 切换模型。

Show full SKILL.md (335 more words)Show less
⚠️ 别名配置的唯一合法字段是 alias
agents.defaults.models.<model-id>.alias     <-- 唯一合法字段
agents.defaults.models.<model-id>.reasoning <-- 非法!会导致 Gateway 崩溃!
agents.defaults.models.<model-id>.xxx       <-- 任何其他字段都非法!

这是一个已经发生过的事故:在别名配置里加了 "reasoning": true 导致 schema 校验失败,Gateway 崩溃循环 181 次。模型能力属性只能放在 models.providers 的模型定义里,不能放在别名里。


第四步:接入 Fallback 链

在 agents.defaults.model.fallbacks 中把新模型加到合适的位置:

json
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "minimax/MiniMax-M2.1",
        "fallbacks": [
          "newcli-aws/claude-haiku-4-5-20251001",
          "minimax/MiniMax-M2.1",
          "deepseek/deepseek-chat",
          "qwen-portal/coder-model",
          "newcli/claude-haiku-4-5-20251001",
          "newcli-gemini/gemini-2.5-flash-lite",
          "deepseek/deepseek-reasoner",
          "qwen-portal/vision-model"
        ]
      }
    }
  }
}
Fallback 排序原则

AWS 线路优先,DeepSeek 兜底:

位置模型为什么选它
1newcli-aws/claude-haiku⭐ AWS 线路,消耗 1/24
2minimax/MiniMax-M2.1月费 (100 prompts/5h)
3deepseek/deepseek-chatDeepSeek 按量付费
4qwen-portal/coder-modelQwen 免费 2000/天
5newcli/claude-haiku主线路备用
6newcli-gemini/gemini-2.5-flash-liteGemini 最轻量
7deepseek/deepseek-reasonerreasoning 备用
8qwen-portal/vision-modelvision 备用

其他模型(Claude Opus、GPT-5.3、Gemini 3 Pro 等高端模型)不放 fallback 链,需要时通过 /model <别名> 手动切换。图片生成模型绝不放入 fallback 链。


第五步:验证

5.1 JSON 语法检查
bash
python3 -c "import json; json.load(open('$HOME/.openclaw/openclaw.json')); print('JSON OK')"
5.2 Schema 校验
bash
openclaw doctor

如果输出包含 Unrecognized key 就说明有非法字段,必须修复后才能重启。

5.3 重启 Gateway
bash
# macOS
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway

# 等 3 秒后确认状态
sleep 3
launchctl print gui/$(id -u)/ai.openclaw.gateway | grep -E "job state|last exit"

期望看到:

last exit code = 0
job state = running

如果 last exit code = 1 且 job state 不是 running,检查错误日志:

bash
tail -20 ~/.openclaw/logs/gateway.err.log
5.4 功能验证

在任意已绑定的聊天中测试三个 provider:

/model claude-opus    # 测试 Claude
/model gpt53          # 测试 GPT
/model gemini3pro     # 测试 Gemini
/model Minimax        # 切回主力

排障

问题:所有模型都返回"暂不支持"
  • 可能原因 1:API Key 过期或余额不足 → 登录 NewCLI 后台检查
  • 可能原因 2:并发限制,已有其他客户端占用 → 关闭其他使用同一 Key 的进程
  • 可能原因 3:服务临时维护 → 稍后再试
问题:Gateway 启动后立刻崩溃
  • 最可能原因:配置中有非法字段
  • 诊断:tail -20 ~/.openclaw/logs/gateway.err.log,找 Unrecognized key
  • 修复:删除非法字段,或运行 openclaw doctor --fix
问题:部分 provider 能用,部分不行

先检查 baseUrl 和 api 协议是否匹配:

Provider正确 baseUrl正确 api
newclihttps://code.newcli.com/claudeanthropic-messages
newcli-awshttps://code.newcli.com/claude/awsanthropic-messages
newcli-codexhttps://code.newcli.com/codex/v1openai-completions
newcli-geminihttps://code.newcli.com/gemini/v1betagoogle-generative-ai

检查 apiKey:四个 provider 应使用相同的 Key。

问题:模型能切换但回复为空或报错
  • Claude (newcli):
    • 正确 baseUrl:https://code.newcli.com/claude(OpenClaw 自动拼接 /v1/messages)
    • 错误:https://code.newcli.com/claude/v1(变成 /claude/v1/v1/messages)
  • GPT (newcli-codex):
    • 正确 baseUrl:https://code.newcli.com/codex/v1(OpenClaw 自动拼接 /chat/completions)
    • 错误:https://code.newcli.com/codex/v1/chat/completions(重复拼接)
  • Gemini (newcli-gemini):
    • 正确 baseUrl:https://code.newcli.com/gemini/v1beta(OpenClaw 自动拼接 /models/<id>:streamGenerateContent)
    • 错误:https://code.newcli.com/gemini(缺少 /v1beta)
    • 错误:https://code.newcli.com/gemini/v1beta/models(重复 /models)
问题:GPT 模型返回 "403 Your request was blocked"
  • 原因:NewCLI 的 Codex 端点有 Cloudflare WAF 防护,当 OpenClaw 发送大 context(>100K tokens)请求时容易触发拦截
  • 现象:curl 小请求能通,但 OpenClaw 实际使用时被 403
  • 临时方案:暂不将 GPT 模型放入 fallback 链,避免浪费 failover 时间;需要时通过 /model gpt53 手动切换,小 context 场景下可能可用
  • 根本解决:联系 NewCLI 服务商确认 Codex 端点的 Cloudflare 规则
问题:Gemini 返回 "Request contains an invalid argument"
  • 确保 api 字段为 "google-generative-ai",不是 "openai-completions"
  • OpenClaw 会自动构造正确的 Google Generative AI 格式请求

变更记录

日期版本变更内容变更人
2026-02-08v1.0创建 NewCLI provider 配置指南(Claude 系列)jooey (via Claude Code)
2026-02-08v2.0合并 newcli-codex (GPT 系列) 配置指南ConfigBot (via OpenClaw with Opus 4.6)
2026-02-08v3.0合并 newcli-gemini (Gemini 系列) 配置指南ConfigBot (via OpenClaw with Opus 4.6)
2026-02-08v3.1添加 Gemini 生图模型;精简 fallback 链(每 provider 一个最轻量模型)ConfigBot (via OpenClaw with Opus 4.6)
2026-02-08v3.2记录 GPT 403 问题;从 fallback 链移除 GPT 模型ConfigBot (via OpenClaw with Opus 4.6)
2026-02-08v4.0新增 newcli-aws provider(AWS 特价线路,消耗 1/24);更新 fallback 策略;更新额度信息ConfigBot (via OpenClaw with Opus 4.6)

© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/add-newcli-provider of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • README.md
  • _meta.json

Open the folder on GitHubat commit e5199b5

Compare with similar skills

Add Newcli Provider next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Newcli Provider compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Newcli Provider this skillLeoYeAI/openclaw-master-skills2.2k—~4.9kAutomated safety check: PassMIT
Agent Squad Python Guide2FastLabs/agent-squad7.8k—~4.7kAutomated safety check: PassApache-2.0
Bedrockitsmostafa/aws-agent-skills1.2k—~4.9kAutomated safety check: PassMIT
Run Bitrouter Benchmarkbitrouter/bitrouter235—~2.2kAutomated safety check: PassApache-2.0
LLM To Bedrockaws/agent-toolkit-for-aws2.8k—~21kAutomated safety check: PassApache-2.0
Credentialsalinaqi/maggy707—~2.4kAutomated safety check: NotesMIT

Similar skills

  • Agent Squad Python Guide

    2FastLabs/agent-squad

    Map of the agent-squad Python framework for async multi-agent orchestration: which agent, classifier, storage and tool provider to pick, and the pitfalls to avoid.

    7.8k GitHub stars~4.7k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Bedrock

    itsmostafa/aws-agent-skills

    AWS Bedrock foundation models for generative AI. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub stars~4.9k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Run Bitrouter Benchmark

    bitrouter/bitrouter

    A skill your agent uses when a user wants to run, compare, resume, audit, share, or submit a Harbor benchmark through BitRouter, including choosing a Harbor dataset and agent, confirming routed…

    235 GitHub stars~2.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • LLM To Bedrock

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses when the user wants to migrate code that calls OpenAI, Gemini/Google AI, or the Anthropic API to Amazon Bedrock — a pure model/SDK rewrite.

    2.8k GitHub stars~21k tokensUpdated today
    DevelopmentAuto-check passed
  • Credentials

    alinaqi/maggy

    Centralized API key management from Access.txt. An agent skill from alinaqi/maggy.

    707 GitHub stars~2.4k tokensUpdated 15 days ago
    SecurityAuto-check: notes
  • Scanning For Hardcoded Secrets

    jeremylongshore/tons-of-skills-marketplace

    Scan a source-code tree for hardcoded credentials embedded in source files: AWS access keys, GitHub tokens, Stripe keys, Slack tokens, Anthropic API keys, OpenAI keys, JWT signing secrets, generic…

    2.8k GitHub stars~2.1k tokensUpdated today
    DevOps & CloudAuto-check: notes

More from LeoYeAI/openclaw-master-skills

All 1,235 skills in this repo
  • DevOps Pipeline Management

    LeoYeAI/openclaw-master-skills

    Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Feishu Document Collaboration

    LeoYeAI/openclaw-master-skills

    Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Files Memory System

    LeoYeAI/openclaw-master-skills

    Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    LeoYeAI/openclaw-master-skills

    Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    LeoYeAI/openclaw-master-skills

    Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Add Newcli Provider

What does Add Newcli Provider do?

为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入 Claude 或 GPT 模型的场景。包含 provider…. Add Newcli Provider is an agent skill from LeoYeAI/openclaw-master-skills.

How do I install Add Newcli Provider in Claude Code?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a claude-code`. Or copy the skill folder (skills/add-newcli-provider in LeoYeAI/openclaw-master-skills) into .claude/skills/add-newcli-provider in your project. Claude Code loads it when a task matches its description.

How do I install Add Newcli Provider in Codex?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a codex`. Or copy the skill folder (skills/add-newcli-provider in LeoYeAI/openclaw-master-skills) into .agents/skills/add-newcli-provider in your project. Codex loads it when a task matches its description.

Can I use Add Newcli Provider in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-newcli-provider, .gemini/skills/add-newcli-provider, .github/skills/add-newcli-provider and .opencode/skills/add-newcli-provider in your project.

What does Add Newcli Provider need to run?

Going by SKILL.md and its folder, Add Newcli Provider needs the command-line tools its instructions call (curl and python3) and credentials named API_KEY. Our summary lists: A credential in API_KEY.

Does Add Newcli Provider access the network?

SKILL.md names 2 domains. In commands or code: code.newcli.com; the agent is likely to contact it when it follows the instructions. As links in the text: foxcode.rjj.cc. This is read from the text; nothing was executed.

Is Add Newcli Provider safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Newcli Provider use?

Add Newcli Provider is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Newcli Provider use?

About 4.9k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Newcli Provider?

Skills that share tags, products or a category with Add Newcli Provider: Agent Squad Python Guide (2FastLabs/agent-squad, 7.8k stars), Bedrock (itsmostafa/aws-agent-skills, 1.2k stars), Run Bitrouter Benchmark (bitrouter/bitrouter, 235 stars) and LLM To Bedrock (aws/agent-toolkit-for-aws, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Newcli Provider?

LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.

Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.