← 返回列表
未验证
对比国内主流大模型 API 价格并计算调用成本
尚未跑自动兼容性验证,可查看页面内的依赖与入口分析。 · 最近上游提交 2026/8/22 · 已提供中文文档
A CLI tool for estimating and comparing API costs of mainstream Chinese LLM models.国内主流 LLM 模型 API 成本估算与对比命令行工具
综合分
28.2
GitHub 分
28.2
用户评分
—
★ Stars
1
周下载量
—
安装插件(需先安装 dsh CLI 引擎:npm install -g @deepseek-ai/dsh)
dsh plugin --profile web add PerryLink/LLM-Cost-Estimator-CN该插件未发布到 npm,走 GitHub 源安装(pnpm 若拦截 prepare 脚本,按其提示在 pnpm-workspace.yaml 的 allowBuilds 中放行后重跑)
数据截至 2026/9/16(元数据每日更新 · 实装验证按队列轮转,单条结论的验证时间见上方)
用户评分
还没有人投票,来当第一个
订阅周报,不错过优质插件更新
每周一封 · 高评分插件 + 新用户活动
README
LLM-Cost-Estimator-CN 估算并对比国内主流大模型 API 成本的命令行工具。 已移植到 dsh-budget —— PerryLink DSH 插件家族的一员。 License English · 简体中文 功能简介 llm-cost-estimator-cn 加载内置的国内主流大模型价格表(人民币 / 1K tokens,共 7 款模型),根据你预期 的输入与输出 token 数量计算输入、输出和总成本,并按总成本排序,同时显示与最便宜模型的差距百分比。 特性 - 对比 DeepSeek、百度文心、阿里通义、智谱 GLM、百川智能、月之暗面 Kimi 的 API 定价 - 基于 Rich 的美观交互式终端界面 - 支持直接输入 token 数量或交互式输入 - 成本排序,并显示与最低价的差距百分比 - 支持按模型名称关键词过滤、只显示前 N 个最便宜的模型 快速开始 从 PyPI 安装: pip install llm-cost-estimator-cn 从源码安装: git clone https://github.com/PerryLink/llm-cost-estimator-cn.git cd llm-cost-estimator-cn pip install -e . 使用方法 估算 1,000,000 输入 token、100,000 输出 token 的成本 llm-cost-estimator-cn --input-tokens 1000000 --output-tokens 100000 交互式模式(自动提示输入 token 数量) llm-cost-estimator-cn 按模型名称关键词过滤 llm-cost-estimator-cn -i 1000000 -o 100000 --model deepseek 只显示前 5 个最便宜的模型 llm-cost-estimator-cn -i 1000000 -o 100000 --top 5 支持的模型 价格为人民币 / 1K tokens。 | 模型 | 提供商 | 输入 | 输出 | |------|--------|------|------| | deepseek-chat | DeepSeek | ¥0.001 | ¥0.002 | | ernie-4.0 | 百度 | ¥0.12 | ¥0.12 | | qwen-turbo | 阿里云 | ¥0.008 | ¥0.008 | | qwen-plus | 阿里云 | ¥0.04 | ¥0.04 | | glm-4 | 智谱AI | ¥0.1 | ¥0.1 | | baichuan2-turbo | 百川智能 | ¥0.008 | ¥0.008 | | moonshot-v1-8k | 月之暗面 | ¥0.012 | ¥0.012 | 项目结构 llm-cost-estimator-cn/ ├── src/llm_cost_estimator_cn/ │ ├── __init__.py # 包入口,版本号 │ ├── __main__.py # 支持 python -m 运行 │ ├── cli.py # Click CLI 定义 │ ├── core.py # 成本计算核心逻辑 │ ├── utils.py # 辅助工具函数 │ └── data/models.json # 模型定价数据 ├── tests/test_core.py # 单元测试 ├── pyproject.toml # 构建配置(setuptools) ├── LICENSE ├── CONTRIBUTING.md └── README.md 技术栈 | 组件 | 库 | |------|----| | CLI 框架 | Click | | 终端 UI | Rich | | 构建系统 | setuptools | | 测试 | pytest | | 代码检查 | Ruff | | 代码格式化 | Black | 开发 pip install -e ".[dev]" pytest 相关项目 - dsh-budget — 本项目被移植进的 DSH 插件 - PerryLink — PerryLink DSH 插件家族 许可证 Apache License 2.0 © 2026 PerryLink
扫码进群