llmledger is an open-source tool for answering the question "which AI model should I use, and how much does it cost?" By analyzing every price change in the LiteLLM model catalog since September 6, 2023 (covering 4,200+ models), Arena quality scores, and a competitive-risk survival model, it rebuilds data daily to provide users with model selection recommendations and cost forecasts.
Key capabilities include:
- Paste a prompt to get the best value-for-money model, the highest-scoring model, and the cheapest-scoring model for that task (coding, math, writing, images, documents, websites, etc.), with the cost of each answer and the probability of price changes over the next 90 days. Task type is inferred automatically in the browser.
- Compare up to five models side by side on Arena score, price, cost per task, effort level, and speed when using a Claude or ChatGPT plan.
- View the price history of every model in the catalog, the LiteLLM commit link for each change, and an outlook.
- Trends view: replay two years of the Arena leaderboard, compare the best open-source and closed-source models, top manufacturers, and changes in top-quality costs.
- Price history analysis: the probability that newly listed models will change price, be given a retirement date, or be removed within 30 days to 2 years, broken down by manufacturer.
- Provides feed.xml (daily price changes and retirement dates) and digest.md (weekly LLM price summary).
How to use:
- Web version: visit https://pouriaetab.github.io/llmledger/,无需注册,提示词保留在浏览器中。
- MCP plugin: usable in Claude Code, Claude Desktop, Cursor, or any app that supports MCP, with no hosting or keys required. Includes 11 tools: recommend models and effort levels for a project, compare models side by side, estimate budgets, find models within limits, model price history and outlook, new models not yet priced, task duration (learned from user runs), whole-task quotes based on promptfoo samples, whether buying a computer to run open-source models is worthwhile, and the cost of the user's own coding agent usage (ccusage or codeburn export) on other models. See mcp/README.md for details.
- Agent Skill: about 150 tokens (compared with 1000+ tokens for the plugin), requires only Python. Install via npx skills add pouriaetab/llmledger, or copy skills/llmledger into the agent's skills folder.
- GitHub Action: fails the check or only reports when a model used by the project changes price, receives a retirement date, or leaves the catalog. Available on the GitHub Marketplace, or add it to a scheduled workflow. Keys use LiteLLM's format (e.g. gpt-5, not openai/gpt-5). Can also be run via shell: python action/watch.py --models "gpt-5,claude-sonnet-4-5".
- Model badge: provides a daily-refreshed badge for any README, showing the price per 1M tokens and the probability of a price change within 90 days (amber from 10%), or the retirement date (orange). The address format replaces / in the key with -- and : with - (e.g. badge/azure--eu--gpt-5.json).
When to use:
- When developers or teams perform cost-benefit analysis when choosing AI models.
- When monitoring price changes and lifecycle of models used by a project.
- When obtaining model recommendations and cost estimates directly in environments such as Claude.
- When studying AI model price trends and survival analysis.
Limitations and notes:
- The project states that it does not constitute financial or procurement advice. The numbers describe edits to the public catalog, not the actual cost of any model to users. See DISCLAIMER.md for details.
- Data is based on LiteLLM's MIT-licensed history records; the history is cloned to the local machine and not redistributed. llmledger is independent and not affiliated with BerriAI.
- Quality scores come from LMArena's Arena leaderboard dataset (CC BY 4.0), read once daily. Task inference is based on Arena's human preference dataset (CC BY 4.0). llmledger is not affiliated with LMArena.
- Electricity prices for local or cloud answers in the plugin come from the U.S. Energy Information Administration's Electric Power Monthly Table 5.6.A (average residential price by state), read once daily.
- The project was built using an AI pair programmer (Claude); the specification, statistical design, and conclusions were reviewed by the author.
- Running requires Python 3.14.7 (pinned in .python-version; 3.12 or newer also works), standard library only, plus pyarrow (pinned in requirements.txt) to read Arena historical leaderboards for the trend view; without pyarrow, the page build will not include trend charts. A single command downloads the LiteLLM history, rebuilds everything, and writes the results page.
- Tests: there are 197 tests in tests/ and another 32 plugin tests in mcp/tests; tests that run the page JavaScript require Node.js and are skipped if it is absent.
- Citation: use GitHub's "Cite this repository" button (reads CITATION.cff). Archived on Zenodo: 10.5281/zenodo.23330454 always points to the latest version; version 1.0.0 is 10.5281/zenodo.23330455.
- The data snapshot shows: about 60% of "price changes" are actually corrections to the catalog rather than price changes; after excluding these, about 1 in 10 models changes price within a year after being listed.