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 分