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.
为 OpenClaw 配置 code.newcli.com 作为模型源,包含四个 provider:newcli(Claude 主线路)、newcli-aws(Claude AWS 特价线路,消耗 1/24)、newcli-codex(GPT 系列)、newcli-gemini(Gemini 系列)。适用于需要接入 Claude 或 GPT 模型的场景。包含 provider…
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-newcli-provider --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "add-newcli-provider" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-newcli-provider into .claude/skills/add-newcli-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-newcli-provider", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-newcli-providerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-newcli-provider --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/add-newcli-provider .agents/skills/add-newcli-provider && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-newcli-provider" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-newcli-provider into .agents/skills/add-newcli-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-newcli-provider", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-newcli-provider --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/add-newcli-provider .cursor/skills/add-newcli-provider && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-newcli-provider" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-newcli-provider into .cursor/skills/add-newcli-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-newcli-provider", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/add-newcli-provider--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-newcli-provider --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/add-newcli-provider .gemini/skills/add-newcli-provider && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-newcli-provider" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-newcli-provider into .gemini/skills/add-newcli-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-newcli-provider", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills add-newcli-providerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/add-newcli-provider .github/skills/add-newcli-provider && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-newcli-provider" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-newcli-provider into .github/skills/add-newcli-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-newcli-provider", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-newcli-provider -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-newcli-provider --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/add-newcli-provider .opencode/skills/add-newcli-provider && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-newcli-provider" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-newcli-provider into .opencode/skills/add-newcli-provider/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-newcli-provider", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
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…
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.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
curlpython3From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
code.newcli.comAlso links to:
foxcode.rjj.ccFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
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.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 830 words, ~4,853 tokens.
.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.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,但:
服务商提供了独家 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 直接获取模型列表。请以账户后台的实际统计为准,不要依赖文档中的"支持列表"——文档列出的模型不一定全部对你的账户开放。
这一步不能跳过。 不要把文档里列的模型全加上去,要以实际能调通的为准。
用 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":"暂不支持"}} 或 "未开放" = 该模型不可用。
用 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)= 可用。
如果返回错误或超时 = 该模型不可用。
用 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":"模型未开放"}} = 该模型不可用。
| 模型 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等在文档中列出但实测可能返回"未开放",以你账户的实际情况为准。
| 模型 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 | 代码增强版 |
| 模型 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 | ❌ | 轻量版 |
这些模型用于生成图片,不要加入 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手动切换。
在 ~/.openclaw/openclaw.json 的 models.providers 下添加三个 provider。
"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
}
]
}"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作为备用。
"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
}
]
}"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
}
]
}| 参数 | newcli (Claude) | newcli-aws (Claude AWS) | newcli-codex (GPT) | newcli-gemini (Gemini) |
|---|---|---|---|---|
baseUrl | .../claude | .../claude/aws | .../codex/v1 | .../gemini/v1beta |
api | anthropic-messages | anthropic-messages | openai-completions | google-generative-ai |
authHeader | true | true | 默认(Bearer) | 默认(x-goog-api-key) |
apiKey | 相同 | 相同 | 相同 | 相同 |
| 额度消耗 | 1x | 1/24x ⭐ | 1x | 1x |
contextWindow | 200K | 200K | 128K | 1M |
maxTokens | 8192 | 8192 | 8192 | 65536 |
错误做法:把文档里所有模型都堆上去 正确做法:只添加第一步中测试通过的模型
添加不存在的模型不会导致崩溃,但 fallback 到它时会浪费一次请求超时,影响响应速度。
在 agents.defaults.models 下为新模型添加别名,方便在聊天中用短名切换:
{
"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 切换模型。
aliasagents.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 的模型定义里,不能放在别名里。
在 agents.defaults.model.fallbacks 中把新模型加到合适的位置:
{
"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"
]
}
}
}
}AWS 线路优先,DeepSeek 兜底:
| 位置 | 模型 | 为什么选它 |
|---|---|---|
| 1 | newcli-aws/claude-haiku | ⭐ AWS 线路,消耗 1/24 |
| 2 | minimax/MiniMax-M2.1 | 月费 (100 prompts/5h) |
| 3 | deepseek/deepseek-chat | DeepSeek 按量付费 |
| 4 | qwen-portal/coder-model | Qwen 免费 2000/天 |
| 5 | newcli/claude-haiku | 主线路备用 |
| 6 | newcli-gemini/gemini-2.5-flash-lite | Gemini 最轻量 |
| 7 | deepseek/deepseek-reasoner | reasoning 备用 |
| 8 | qwen-portal/vision-model | vision 备用 |
其他模型(Claude Opus、GPT-5.3、Gemini 3 Pro 等高端模型)不放 fallback 链,需要时通过 /model <别名> 手动切换。图片生成模型绝不放入 fallback 链。
python3 -c "import json; json.load(open('$HOME/.openclaw/openclaw.json')); print('JSON OK')"openclaw doctor如果输出包含 Unrecognized key 就说明有非法字段,必须修复后才能重启。
# 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,检查错误日志:
tail -20 ~/.openclaw/logs/gateway.err.log在任意已绑定的聊天中测试三个 provider:
/model claude-opus # 测试 Claude
/model gpt53 # 测试 GPT
/model gemini3pro # 测试 Gemini
/model Minimax # 切回主力tail -20 ~/.openclaw/logs/gateway.err.log,找 Unrecognized keyopenclaw doctor --fix先检查 baseUrl 和 api 协议是否匹配:
| Provider | 正确 baseUrl | 正确 api |
|---|---|---|
newcli | https://code.newcli.com/claude | anthropic-messages |
newcli-aws | https://code.newcli.com/claude/aws | anthropic-messages |
newcli-codex | https://code.newcli.com/codex/v1 | openai-completions |
newcli-gemini | https://code.newcli.com/gemini/v1beta | google-generative-ai |
检查 apiKey:四个 provider 应使用相同的 Key。
https://code.newcli.com/claude(OpenClaw 自动拼接 /v1/messages)https://code.newcli.com/claude/v1(变成 /claude/v1/v1/messages)https://code.newcli.com/codex/v1(OpenClaw 自动拼接 /chat/completions)https://code.newcli.com/codex/v1/chat/completions(重复拼接)https://code.newcli.com/gemini/v1beta(OpenClaw 自动拼接 /models/<id>:streamGenerateContent)https://code.newcli.com/gemini(缺少 /v1beta)https://code.newcli.com/gemini/v1beta/models(重复 /models)/model gpt53 手动切换,小 context 场景下可能可用api 字段为 "google-generative-ai",不是 "openai-completions"| 日期 | 版本 | 变更内容 | 变更人 |
|---|---|---|---|
| 2026-02-08 | v1.0 | 创建 NewCLI provider 配置指南(Claude 系列) | jooey (via Claude Code) |
| 2026-02-08 | v2.0 | 合并 newcli-codex (GPT 系列) 配置指南 | ConfigBot (via OpenClaw with Opus 4.6) |
| 2026-02-08 | v3.0 | 合并 newcli-gemini (Gemini 系列) 配置指南 | ConfigBot (via OpenClaw with Opus 4.6) |
| 2026-02-08 | v3.1 | 添加 Gemini 生图模型;精简 fallback 链(每 provider 一个最轻量模型) | ConfigBot (via OpenClaw with Opus 4.6) |
| 2026-02-08 | v3.2 | 记录 GPT 403 问题;从 fallback 链移除 GPT 模型 | ConfigBot (via OpenClaw with Opus 4.6) |
| 2026-02-08 | v4.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
SKILL.md and 2 other files in skills/add-newcli-provider of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Add Newcli Provider this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.9k | Automated safety check: Pass | MIT | |
| Agent Squad Python Guide2FastLabs/agent-squad | 7.8k | — | ~4.7k | Automated safety check: Pass | Apache-2.0 | |
| Bedrockitsmostafa/aws-agent-skills | 1.2k | — | ~4.9k | Automated safety check: Pass | MIT | |
| Run Bitrouter Benchmarkbitrouter/bitrouter | 235 | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| LLM To Bedrockaws/agent-toolkit-for-aws | 2.8k | — | ~21k | Automated safety check: Pass | Apache-2.0 | |
| Credentialsalinaqi/maggy | 707 | — | ~2.4k | Automated safety check: Notes | MIT |
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.
itsmostafa/aws-agent-skills
AWS Bedrock foundation models for generative AI. An agent skill from itsmostafa/aws-agent-skills.
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…
aws/agent-toolkit-for-aws
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.
alinaqi/maggy
Centralized API key management from Access.txt. An agent skill from alinaqi/maggy.
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…
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.
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.
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.
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.
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.
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.
Works with
为 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.