Llmledger

io.github.pouriaetab由 GitHub 账号 pouriaetab 发布v0.2.0更新于 Nov 4, 2026

Which AI model, and what it costs: LiteLLM prices, Arena ratings and price history.

概览

AI 生成的概览

在助手内回答该用哪个 AI 模型、要花多少钱,综合 LiteLLM 价格、Arena 评分与价格历史。

可以做什么
  • 按评分、价格、提示长度、能力和厂商筛选模型,或查询单个模型及其所有托管方
  • 比较 2 到 6 个指定模型的评分、价格、单次任务成本与套餐用量
  • 估算某工作负载在各模型上的费用(含缓存节省),并查看模型价格历史与变动概率
  • 为提示或项目推荐模型与投入档位,并列出已评分但尚无定价的新模型
  • 记录计时运行并估算单次调用或整个任务耗时;用 promptfoo 样本预测整个任务的耗时、成本与准确率
  • 比较自购本地机器与云端按次付费,并用 ccusage 或 codeburn 导出重算过往编码代理用量
适用场景
适合在为任务挑选模型、估算 token 预算、确认价格是否变动,或在本地硬件与云端按次付费之间做取舍时使用。适合希望不离开助手就得到模型与价格答案的开发者和团队。
运行要求
通过 uvx 以 stdio 在本地运行(需要 uv);无需账号、密钥或环境变量。它会从 llmledger 页面每日下载数据文件,缓存一天并附带离线副本;可用 LLMLEDGER_DATA 指向本地或其他数据文件。
安装前请注意
成本与评分为估算,不构成财务或采购建议,套餐用量按 API 价格推算。可选的 promptfoo 结果、ccusage 或 codeburn 导出仅读取数字与名称,但这些是你机器上的文件,安装前请确认其中内容。计时运行仅以数字形式保存在本地;唯一的网络请求是每日数据下载。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Llmledger,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

llmledger-mcp

Ask Claude (or Cursor, ChatGPT desktop, any app that speaks MCP) which AI model to use and what it costs, in the middle of your work. The answers come from llmledger: LiteLLM's public price catalogue, Arena's ratings by task, and every price change since 2023 with how likely a price is to change next. Rebuilt every day.

Install

Needs uv. Nothing to host and no keys: the plug-in runs on your computer and reads the day's data from the llmledger page, cached for a day, with a bundled copy for offline use.

Claude Code:

bash
claude mcp add llmledger -- uvx llmledger-mcp

Claude Desktop (Settings, Developer, Edit config) or Cursor (.cursor/mcp.json):

json
{  "mcpServers": {    "llmledger": { "command": "uvx", "args": ["llmledger-mcp"] }  }}

A LiteLLM proxy can offer it to a whole team through its MCP gateway, as a stdio server with the same command.

The same answers also come as an Agent Skill, which takes far less of an agent's context until it is used and needs only Python: the folder skills/llmledger in the repository, https://github.com/pouriaetab/llmledger/tree/main/skills/llmledger In Claude Code: /plugin marketplace add pouriaetab/llmledger, then /plugin install llmledger@llmledger.

What you can ask

ToolFor example
suggest_for_project"Which model and effort for this project?" with the starting prompt; pay can be claude or chatgpt to compare within a plan
compare_models"Opus 5.5 or Fable 5.1 for coding, and when is Fable cheaper?"
estimate_cost"What do 2,000 calls a day of 10K tokens in and 1K out cost on these three?", and with cached_tokens and cache_write_tokens, how much the cache saves
find_models"The best rated coding models under $10 per 1M answer tokens that read images"; or name to look one model up with every host that lists it
price_history"Has Claude Opus 5.5's price changed, and how likely is it to change soon?"; with date, "What did it cost on 1 March?" Each change links the LiteLLM change behind it
not_yet_priced"Which new models on Arena have no price yet, and how long does a price usually take?"
estimate_time"How long will 5,000 calls of 2K tokens in and 600 out take on Opus 5.5 through the API, 4 at a time?" Learned from your own runs
log_run"I timed this call: 2,100 in, 640 out, 9.2 seconds", or a promptfoo results file; kept on your computer only
forecast_job"Here is a promptfoo run of 20 of my 5,000 tests: what will the whole job cost and take on each model, and which should I pick?" Reads the file only
local_or_cloud"Should I buy a $2,000 computer to run llama3.1:8b at home, or keep paying for GPT-6.1 at 30,000 calls a month?" The local model's speed from your own runs, electricity from EIA or your price
price_my_usage"Here is my ccusage session --json (or codeburn export -f json) file: what would last month's work have cost on every other model, which ones keep the quality for less, and is the gap real?" Each session at the price of its day, Arena ratings for that kind of work, a 95% range per session; token counts only

Plus a resource, llmledger://snapshot (data dates and sources), and a prompt, pick_a_model.

Good to know

  • Costs and ratings are estimates. Arena ratings say which answers people preferred, not what will work best for you. Plan use (Claude, ChatGPT) assumes a plan runs down in step with API prices, because plans do not publish per-model limits. Not financial or procurement advice.
  • Effort levels come from LiteLLM; the suggested level is a rule of thumb. No open source measures tokens per task at each effort level yet.
  • Many price changes in the catalogue fix a wrong entry rather than change a price: in a labelled sample, about 6 in 10 first price changes. price_history says what each flag on a change means (a likely correction, a unit fix, a change undone) and how often such changes were corrections.
  • Every answer carries the date of its data. When the data is 3 or more days old, the answer says so.
  • price_my_usage prices other models at your own token counts; another model tokenises the same work a little differently (usually within 10 to 20%) and may answer at another length. Models you used are compared on the sessions each one got, which were not the same work, and the answer says so. A model with no cache price has cache tokens counted at its input price, and the row says so.
  • Times come only from your own runs (and the sample's own timed calls for forecast_job), always as a usual time and a slow day. How often a model was right is the share of a sample's checks it passed, with a 95% range; with 20 tests the range is wide, and the answer says when two models cannot be told apart.
  • What the plug-in reads: a prompt given to suggest_for_project is only counted and matched against word lists; a promptfoo results file (log_run, forecast_job) is read for numbers and names only (provider id, latency, token counts, pass or fail), and the prompts, answers and grader text inside it are never passed on or treated as instructions; a ccusage or codeburn export (price_my_usage) is read for model names, dates, session ids and token counts only, never project paths or file names. Timed runs stay on your computer as numbers. The only network call is the daily download of data.json.
  • Set LLMLEDGER_DATA to a local data.json or another address to use your own copy.

Data and licences

Prices: LiteLLM's model_prices_and_context_window.json (MIT). Ratings: the Arena leaderboard (CC BY 4.0). Electricity: the U.S. Energy Information Administration's Electric Power Monthly (public domain). Price history and outlook: llmledger (MIT). Built with FastMCP (Apache-2.0). Independent; not affiliated with BerriAI, LiteLLM or Arena.

来源:mcp/README.md,提交 d1d62ee

工具

11

find_models

Find Models

List the highest rated models for a kind of work within price, prompt size, ability and maker limits, each at its cheapest listing with its rating; or, with `name`, look one model up and list every host that offers it. Use when browsing or filtering the catalogue, or to find a model's exact name. Not for choosing between named models (compare_models), for a prompt you have in hand (suggest_for_project), or for a budget (estimate_cost).

输入参数nametasklimitmakerneedsmin_contextmax_output_price

compare_models

Compare Models

Compare 2 to 6 named models for a kind of work: rating, prices, cost per task (or how fast each uses a Claude or ChatGPT plan), the pick, and for each model the share of answer tokens at which it would beat the pick. Use when the user already has candidate models in mind. Not for finding candidates (find_models), for reading a prompt to guess the work (suggest_for_project), or for a monthly budget (estimate_cost).

输入参数paytaskmodels必填input_tokensanswer_tokensoutput_tokens

estimate_cost

Estimate Cost

Price a workload on 1 to 10 models at each one's cheapest listing: dollars per call, per day and per 30 days, and with cache tokens the saving the cache makes. Use when the question is a budget or a bill: token counts and calls a day are known. Not for deciding which model is better (compare_models) or for pricing past usage from an export (price_my_usage).

输入参数models必填input_tokens必填cached_tokenscalls_per_dayoutput_tokens必填cache_write_tokens

price_history

Price History

Show one model's price history: every price and retirement date change since 2023 on every host, each with the LiteLLM change behind it, the chance of a price change, retirement or removal in the next 90 days and year, and with `date`, the prices on that day. Use when the question is about one model over time, a past price, or how likely a price is to move. Not for today's cheapest price of several models (find_models or estimate_cost).

输入参数datemodel必填

suggest_for_project

Suggest For Project

Suggest a model and effort level for a prompt or a described project: it guesses the kind of work and names the best value (the cheapest model the votes cannot tell apart from the top), the top rated and the cheapest rated, each with its cost per task. Use when the user asks "which model should I use for this" and the work itself is in hand. Not for named candidates (compare_models) or for browsing by limits (find_models).

输入参数payanswerprompt必填

not_yet_priced

Not Yet Priced

List the models Arena has rated that LiteLLM's catalogue does not price yet, with how soon the catalogue usually prices a maker's models after Arena first shows them. Use when a brand-new model is missing from the other tools' answers, or to ask what is coming. Not for models that already have a price (find_models).

输入参数maker

estimate_time

Estimate Time

Estimate how long one call and a whole job take, as a usual time and a slow day, from the user's own timed runs of that model called that way (kept by log_run). Use when the question is time, not money, and some runs have been logged; it says so when none have. Not for cost (estimate_cost) or for a job you have a promptfoo sample of (forecast_job gives time and cost together).

输入参数waycallsmodel必填thinkingconcurrencyinput_tokens必填output_tokens必填

log_run

Log Run

Record a timed run (model, tokens, seconds, how it was called), or every result of a promptfoo results file, in a file on this computer so estimate_time can learn from it. Use right after a call or a promptfoo run whose time is known. Not a query: it stores and returns what it stored. Nothing is sent anywhere.

输入参数waytaskmodelsecondsthinkinginput_tokensoutput_tokenspromptfoo_results

forecast_job

Forecast Job

Estimate a whole job's time, cost and accuracy from a promptfoo run of a sample of it: for each model in the sample, the time as a usual time and a slow day, the cost at its cheapest listing next to the listing the sample used, the 90-day chance of a price change, how often it was right (95% range) and the break-even against the pick. Use when a promptfoo results file of a sample exists and the whole job's size is known. Not for a job with no sample (estimate_cost for money, estimate_time for time).

输入参数wayitems必填thinkingconcurrencypromptfoo_results必填wrong_answer_cost

local_or_cloud

Local Or Cloud

Compare running an open model on a computer you buy with paying a cloud model per call: the cost a month each way, the month the computer pays for itself, and whether it keeps up with the load. Use when the question is whether to buy hardware for a local model. Needs timed runs of the local model (log_run) and the computer's price; electricity comes from EIA or the user's own rate. Not for cloud-only comparisons (compare_models or estimate_cost).

输入参数statewattsmonthsthinkinglocal_waylocal_model必填cloud_models必填input_tokens必填cached_tokensoutput_tokens必填hardware_price必填calls_per_month必填另有 1 个

price_my_usage

Price My Usage

Price the user's own past coding agent usage, from a ccusage or codeburn export, on every rated model: each session at the price of its day, the models that keep the rating and cost less, a 95% range for the cost per session, and whether two models differ for real or the data cannot tell. Use when a usage export (or a list of token mixes) exists and the question is what the same work would have cost elsewhere. Not for a future workload (estimate_cost) or for a prompt (suggest_for_project). Reads token counts, names and dates only; nothing leaves the computer.

输入参数mixtasklimitexportcompare

版本历史

7
  1. v0.2.0最新Oct 21, 2026
  2. v0.1.9Oct 21, 2026
  3. v0.1.8Oct 20, 2026
  4. v0.1.7Oct 19, 2026
  5. v0.1.4Oct 19, 2026
  6. v0.1.2Oct 18, 2026
  7. v0.1.1Oct 18, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分