Skip to main content

rmodel

探测商用大模型可用性,并一键把免费额度/按量模型写入 OpenClaw / Codex(当前支持千问/DashScope、火山方舟按量 API)。

PyPI 包名是 rmodel-cli(裸名 rmodel 已被占用);安装后命令仍是 rmodel

可用性探测 ≠ 账单状态。qwen-free千问 CLI usage free-tier 为准。

安装(PyPI)

pip install rmodel-cli
rmodel --help

升级:

pip install -U rmodel-cli

开发安装:

git clone <your-repo>
cd rmodel   # 或本地仓库目录
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

只需本机有 Node.js / npm(>=18)

千问(qwen-free

rmodel qwen-free 会在需要时自动:

  1. npm install -g @qianwenai/qianwen-cli
  2. 拉起 qianwen auth login(浏览器授权)
  3. 拉取免费额度模型并写入 OpenClaw / Codex

火山方舟(ark-free

rmodel ark-free 会在需要时自动:

  1. npm install -g @volcengine/ark-cli
  2. 拉起 arkcli auth login volc-sso(浏览器 SSO)
  3. 从模型广场拉取文本对话候选,HTTP 探测后写入 OpenClaw / Codex

说明: 方舟没有与千问 usage free-tier 对等的 CLI 命令;ark-free 走按量 /api/v3不包含 Coding Plan / Agent Plan(/api/coding//api/plan/ 会被排除)。

一键配置千问免费模型

rmodel qwen-free

控制台以下拉列表方式多选(每页 10 个,最多选 10 个),并标注模型类型:

  • ↑↓ 切换当前项
  • 空格 勾选 / 取消
  • Enter 确认已选
  • n / r 下一页刷新,p 上一页
  • a 全选本页,q 取消

展示示例:qwen-plus [文本推理] 额度 ... / qwen-vl-max [文本推理+视觉理解] / wan2.6-t2i [视觉生图]

可选:

rmodel qwen-free --dry-run
rmodel qwen-free --set-primary --agent main
rmodel qwen-free --api-key sk-xxx
rmodel qwen-free --text-only
rmodel qwen-free --yes --models qwen-plus,qwen-turbo   # 非交互选模型;若无 Key 仍会在终端提示输入
rmodel qwen-free --no-install
rmodel qwen-free --no-login
rmodel qwen-free --target codex   # 一键写 Codex(等同 OpenClaw 效果)

OpenClaw

场景 行为
已有 DashScope/千问 API provider 复用 Key,补充仍有免费额度的模型选项
没有 API provider 引导创建/填写 API Key,新建 dashscope provider 并写入
订阅 Plan(qianwen-plan 等) 不当作 API 配置复用

Codex(--target codex

写入 ~/.codex/config.toml,效果与 OpenClaw 对齐、可直接 codex

  1. model + model_provider = "dashscope"
  2. [model_providers.dashscope]base_url(兼容模式)、wire_api = "responses"
  3. experimental_bearer_token(有可用 Key 时写入;此时不写 env_key,避免 Codex 仍要求 export)
  4. ~/.codex/model-catalog.local.json(所选模型元数据)

注意: 当前 Codex CLI 只走 Responses API。kimi-* 等仅支持 Chat Completions 的模型会被隐藏/探测拒绝;请选 qwen3.8-maxqwen3-coder-plusqwen-plus 等。否则会出现 stream disconnected before response.completed

优先复用 OpenClaw 里已有的 DashScope API Key / DASHSCOPE_API_KEY

qianwen auth login(CLI 会话)与 DashScope API Key 是两套凭证。
API Key 控制台:https://bailian.console.aliyun.com/?tab=model#/api-key

一键配置火山方舟按量模型

rmodel ark-free

交互选择与 qwen-free 相同(每页 10 个,最多 10 个)。列表项显示 按量 · 写入前 HTTP 探测(方舟无免费额度 CLI,以探测结果为准)。

可选:

rmodel ark-free --dry-run
rmodel ark-free --set-primary --agent main
rmodel ark-free --api-key 907f-...
rmodel ark-free --text-only
rmodel ark-free --yes --models deepseek-v4-flash-ga-260731,glm-5-2-260617
rmodel ark-free --no-install
rmodel ark-free --no-login
rmodel ark-free --target codex

OpenClaw

场景 行为
已有 volcengine-arkAPI provider 复用 Key / baseUrl,补充探测通过的模型
没有 API provider 新建 volcengine-arkbaseUrl=https://ark.cn-beijing.volces.com/api/v3
Coding/Agent Plan 不当作 API 配置复用

Codex(--target codex

与千问路径一致:写入 model + [model_providers.volcengine-ark]wire_api=responses)+ experimental_bearer_token + 本地 catalog。

API Key 优先级:--api-key → OpenClaw 已有 provider → ARK_API_KEY → arkcli 登录后本地 Key → 终端粘贴。

控制台:https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey

未开通的模型会探测失败;可用 arkcli models activate <model> 开通后再试。

通用探测

rmodel probe --source openclaw
rmodel apply --target openclaw --agent main --to dashscope/qwen-plus

发布到 PyPI(维护者)

首次配置凭证(写入 macOS 钥匙串,之后不用再 export):

./scripts/setup-pypi-auth.sh

日常发布:

./scripts/publish.sh

开发

pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rmodel_cli-0.2.1.tar.gz (61.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rmodel_cli-0.2.1-py3-none-any.whl (57.6 kB view details)

Uploaded Python 3

File details

Details for the file rmodel_cli-0.2.1.tar.gz.

File metadata

  • Download URL: rmodel_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 61.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for rmodel_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 301e541bd457f22f7785f7b07348a1594282b02a9583312ea6983606acc3f25c
MD5 0523404fab9fa50de59014606dc15c8a
BLAKE2b-256 e5442a924b17b7f9600f82c189e55af0af49d8c5673e52ec8a7da686f9fca689

See more details on using hashes here.

File details

Details for the file rmodel_cli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: rmodel_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 57.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for rmodel_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21ad0915e11713ae62dd1a82ec63f468317e7184b261ef6f9c06ea9fddd1aaf7
MD5 b5c8586d4b40e65799bebb02b8b5d076
BLAKE2b-256 7ab5fdfed752692d64a20119d82ed333307043267c0cb3745cd4c370c3dda8c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page