Reference cloud model/pricing for the shadow-cost estimate #11
Notifications
Due Date
No due date set.
Blocks
Depends on
#14 Author the docker-compose service for the chosen proxy
haylan/LLM-Server
#10 Which self-hosted AI gateway/proxy tool fits this effort's needs?
haylan/LLM-Server
Reference: haylan/LLM-Server#11
Reference in New Issue
Block a user
Part of #9
Question
To show "what this local usage would have cost on a cloud API" (per #9's Destination), which reference cloud model/API pricing should the shadow-cost estimate use, and how should that mapping work given the tool chosen in #10 (its custom-pricing mechanism, and whatever token/usage metadata it captures per request)?
Consider: a fixed reference model (e.g. current Claude pricing, since that's what the user already tracks day-to-day) vs. a pricing table covering a few comparable tiers; how token counts from a local model map onto another model's pricing units; where the confirmed rate gets configured in the chosen tool.
Recommendation: Claude Sonnet 5, fixed single reference. $2/MTok input, $10/MTok output (current standard pricing per Anthropic's pricing page, checked 2026-08-25) — matches what the user already tracks day-to-day and what this repo's own coding-cli-setup.md points coding CLIs at, and is the closer size-match to the locally hosted Qwen3.8-27B than Opus tier. Rejected a multi-tier pricing table as unneeded bookkeeping for a for-fun shadow estimate.
LiteLLM config shape (confirms/extends #10's mechanism): a
model_infoblock on the local model'smodel_listentry inconfig.yaml:Input/output are distinguished, overrides are per-model (LiteLLM's built-in cost map for other providers is untouched), and the resulting spend surfaces via
/key/info,/team/info//user/info, the Admin UI Usage dashboard, andkwargs["response_cost"]per call — all through LiteLLM's normalcompletion_cost()path, no extra tracking code.Token mapping: LiteLLM prices whatever token counts llama.cpp reports in its own
usage.prompt_tokens/completion_tokens— no re-tokenization against Claude's tokenizer. Treating that count as directly billable at Claude's rate is a fine approximation for a for-fun shadow estimate, not real accounting.Staleness: local model pricing lives only in this repo's explicit config (LiteLLM's built-in default pricing table doesn't apply to unlisted local models), so risk is a one-line config edit if Anthropic changes Sonnet 5's price — recommend a source-URL+date comment in the config for #14.
Full findings + sources: docs/research/proxy-shadow-pricing.md on branch
research/proxy-shadow-pricing.