Skip to main content

rmodel

探测商用大模型可用性,并一键把免费额度模型写入 OpenClaw / Codex(当前支持千问/DashScope,后续扩展火山等厂商)。

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)rmodel qwen-free 会在需要时自动:

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

一键配置千问免费模型

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 probe --source openclaw
rmodel apply --target openclaw --agent main --to dashscope/qwen-plus

发布到 PyPI(维护者)

export TWINE_PASSWORD=pypi-...
./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.1.0.tar.gz (46.4 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.1.0-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rmodel_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 46.4 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.1.0.tar.gz
Algorithm Hash digest
SHA256 d5f75a138532310e5a997cb4f74910d0de8a1e1c73e9a16833e73402fb0051b4
MD5 699319196c2cc865085e809523894e87
BLAKE2b-256 fc5d0edfb1375f422d0c35b06a9dd052d7223018425f70b93a2b059cf32b8ac2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rmodel_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 44.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 792bfc1a907e656d912cce77446978e6c1488d9e445e625898916f3aff185dbb
MD5 bce709ab95b4aab3dc7ce973abef4692
BLAKE2b-256 38957b3f209daac66a4938e6ee8a748a62e89dc02f4ad5cce866520d7850d25f

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