llmledger
v0.2.2Which AI model, and what it costs: LiteLLM prices, Arena ratings and price history.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
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).
| Parameter | Type | Description |
|---|---|---|
limit | integer | How many models to list (up to 200 for the whole catalogue) |
maker | Only this maker, for example anthropic or openai | |
max_output_price | Highest answer price, dollars per 1M tokens | |
min_context | Smallest prompt size the model must take, in tokens | |
name | Look up one model by name instead of browsing: all its listings | |
needs | array | What the model must be able to do |
task | string | The kind of work, as Arena rates it |
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).
| Parameter | Type | Description |
|---|---|---|
models * | array | 2 to 6 model names, for example claude-opus-5.5, gpt-6.1-sol |
answer_tokens | Answer tokens per model when they differ, by the names given | |
input_tokens | integer | Prompt tokens per task |
output_tokens | integer | Answer tokens per task, including hidden thinking |
pay | string | api: dollars; claude or chatgpt: how fast each uses that plan |
task | string | The kind of work, as Arena rates it |
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).
| Parameter | Type | Description |
|---|---|---|
input_tokens * | integer | Prompt tokens per call |
models * | array | 1 to 10 model names |
output_tokens * | integer | Answer tokens per call, including hidden thinking |
cache_write_tokens | integer | How many of the prompt tokens are written to the cache |
cached_tokens | integer | How many of the prompt tokens are read from the cache |
calls_per_day | number | Calls per day |
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).
| Parameter | Type | Description |
|---|---|---|
model * | string | A model name, for example claude-opus-5.5, or one listing such as bedrock/anthropic.claude-opus-5-5 |
date | A day as YYYY-MM-DD: each listing's prices that day and the change that set them |
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).
| Parameter | Type | Description |
|---|---|---|
prompt * | string | The project's starting prompt, or a description of the work |
answer | string | Typical answer length |
pay | string | api: dollars; claude or chatgpt: compare within that plan |
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).
| Parameter | Type | Description |
|---|---|---|
maker | Only this maker, for example meta or ibm |
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).
| Parameter | Type | Description |
|---|---|---|
input_tokens * | integer | Prompt tokens per call |
model * | string | A model name, as the catalogue or Ollama names it |
output_tokens * | integer | Answer tokens per call, including hidden thinking |
calls | integer | How many calls the job makes |
concurrency | integer | Calls running at once |
thinking | boolean | Thinking turned on |
way | string | How the model is called |
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.
| Parameter | Type | Description |
|---|---|---|
input_tokens | Prompt tokens of the call | |
model | The model that ran | |
output_tokens | Answer tokens of the call, hidden thinking included | |
promptfoo_results | Path of a promptfoo results file (promptfoo eval -o results.json): every result becomes a run | |
seconds | How long the call took | |
task | The kind of work, if known | |
thinking | boolean | Thinking was on (a promptfoo result that counts thinking tokens is marked on by itself) |
way | How the model was called (default api; for a promptfoo file, read from each provider) |
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).
| Parameter | Type | Description |
|---|---|---|
items * | integer | How many tests the whole job has |
promptfoo_results * | string | Path of a promptfoo results file from a sample of the job (promptfoo eval --filter-sample 20 -o sample.json) |
concurrency | Calls running at once in the whole job (default: as the sample ran) | |
thinking | boolean | Thinking turned on |
way | How the models are called (default: read from each provider) | |
wrong_answer_cost | Dollars a wrong answer costs you to catch and fix; the pick then counts it |
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).
| Parameter | Type | Description |
|---|---|---|
calls_per_month * | number | Calls a month |
cloud_models * | array | 1 to 5 cloud models to compare with |
hardware_price * | number | What the computer costs you, in dollars |
input_tokens * | integer | Prompt tokens per call |
local_model * | string | The open model you would run at home, as Ollama names it, for example llama3.1:8b |
output_tokens * | integer | Answer tokens per call, including hidden thinking |
cached_tokens | integer | Prompt tokens read from the cloud model's cache |
electricity_price | Your electricity price, dollars per kWh (default: EIA's average for homes) | |
local_way | string | How the local model is called |
months | integer | How many months to compare over |
state | A US state, for EIA's average there, for example Texas | |
thinking | boolean | Thinking turned on for the local model |
watts | Power the computer draws while it answers, in watts |
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.
| Parameter | Type | Description |
|---|---|---|
compare | Two models to test against each other on the same sessions | |
export | Path of a token export on this computer: `ccusage daily --json > f.json`, `ccusage session --json > f.json`, or `codeburn export -f json -o f.json` | |
limit | integer | How many models to list in every_model (the cheapest first) |
mix | Instead of a file: token mixes as {model, date, input, output, cache_read, cache_write, session?} | |
task | The kind of work the sessions were (default: codeburn's categories, else coding) |