add-newcli-provider
为 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 模型"、"加…
Install / Use
npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-providerInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of add-newcli-provider
add-newcli-provider scores 90/100 on our quality scale, 375th of 947 AI & Machine Learning skills we index (top 40%).
Its SKILL.md is 19 KB long, well organised into 40 sections with 16 code examples: a thorough specification that gives an agent plenty to work with.
With 2,149 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-10-30 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 98/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
ReviewOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky: The skill instructs the agent to route OpenClaw model API calls through the third-party proxy `code.newcli.com` (e.g., `baseUrl: https://code.newcli.com/claude`), which redirects the agent's API traffic through an unofficial proxy and expos.
AI review: risky
- The skill instructs the agent to route OpenClaw model API calls through the third-party proxy `code.newcli.com` (e.g., `baseUrl: https://code.newcli.com/claude`), which redirects the agent's API traffic through an unofficial proxy and expos
- It tells the agent to add a fallback chain that prioritizes the `newcli-aws` provider, making the agent send requests through the unofficial proxy by default without clear user confirmation beyond the admin trigger phrase.
- It includes an affiliate registration link (`https://foxcode.rjj.cc/auth/register?aff=7WTAV8R`) and promotes the AWS 'special line' with a 1/24 consumption claim, raising red flags about an unauthorized/resold service while still being conf
AI review by kimi-k2.7-code on 2026-09-30. Automated pattern scan on 2026-09-30. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
add-newcli-provider compared with similar skills
All 4 of these similar skills score higher than add-newcli-provider; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| add-newcli-provider (this skill)by LeoYeAI | 90 | 2.1k | 4mo ago | SKILL.md |
| claude-memby thedotmack | 100 | 117.6k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 92.8k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.8k | today | CLAUDE.md |
Frequently asked questions
- How do I install add-newcli-provider?
- Run
npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider. The install tabs above show the steps for each supported agent. - Which AI agents does add-newcli-provider work with?
- It is written for Claude Code, Gemini CLI and OpenAI Codex, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is add-newcli-provider safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky: The skill instructs the agent to route OpenClaw model API calls through the third-party proxy
code.newcli.com(e.g.,baseUrl: https://code.newcli.com/claude), which redirects the agent's API traffic through an unofficial proxy and expos. It is MIT-licensed and scores 98/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand. - Is add-newcli-provider still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: 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 | 备注 |
|----------|----------|----------|----------|------|
| newcli | Claude (Anthropic) | anthropic-messages | code.newcli.com/claude | 主线路 |
| newcli-aws | Claude (Anthropic) | anthropic-messages | code.newcli.com/claude/aws | ⭐ AWS 特价线路,消耗 1/24 |
| newcli-codex | GPT (OpenAI) | openai-completions | code.newcli.com/codex/v1 | |
| newcli-gemini | Gemini (Google) | google-generative-ai | code.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 |
| 额度消耗 | 1x | 1/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 格式测试:
# 测试主线路
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 格式测试:
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 格式测试:
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-6 | Claude Opus 4.6 | 200K | 最强,适合复杂任务 |
| claude-haiku-4-5-20251001 | Claude Haiku 4.5 | 200K | 轻量快速,适合简单任务 |
其他模型如
claude-sonnet-4-20250514等在文档中列出但实测可能返回"未开放",以你账户的实际情况为准。
GPT 系列(newcli-codex)
| 模型 ID | 名称 | Context | 说明 |
|---------|------|---------|------|
| gpt-5.3-codex | GPT-5.3 Codex | 128K | 最新版本 |
| gpt-5.2 | GPT-5.2 | 128K | 基础版 |
| gpt-5.2-codex | GPT-5.2 Codex | 128K | 代码增强版 |
| gpt-5.1 | GPT-5.1 | 128K | 基础版 |
| gpt-5.1-codex | GPT-5.1 Codex | 128K | 代码增强版 |
| gpt-5.1-codex-mini | GPT-5.1 Codex Mini | 128K | 轻量版 |
| gpt-5.1-codex-max | GPT-5.1 Codex Max | 128K | 增强版 |
| gpt-5 | GPT-5 | 128K | 基础版 |
| gpt-5-codex | GPT-5 Codex | 128K | 代码增强版 |
Gemini 系列(newcli-gemini)— 文本对话模型
| 模型 ID | 名称 | Context | reasoning | 说明 |
|---------|------|---------|-----------|------|
| gemini-3-pro | Gemini 3 Pro | 1M | ✅ | 最新旗舰 |
| gemini-3-pro-high | Gemini 3 Pro High | 1M | ✅ | 旗舰增强版 |
| gemini-3-pro-preview | Gemini 3 Pro Preview | 1M | ✅ | 预览版 |
| gemini-3-flash | Gemini 3 Flash | 1M | ❌ | 快速版 |
| gemini-3-flash-preview | Gemini 3 Flash Preview | 1M | ❌ | 快速预览版 |
| gemini-2.5-pro | Gemini 2.5 Pro | 1M | ✅ | 上一代旗舰 |
| gemini-2.5-flash | Gemini 2.5 Flash | 1M | ❌ | 上一代快速版 |
| gemini-2.5-flash-lite | Gemini 2.5 Flash Lite | 1M | ❌ | 轻量版 |
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 主线路)
"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 特价线路)⭐
"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 系列)
"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 系列)
"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 },
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
117.6kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
92.8kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
79.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
