Skip to content

Add llm-token-costs to the plugin directory - #1891

Open
Mattbusel wants to merge 1 commit into
simonw:mainfrom
tensorust-ai:docs/plugin-directory-llm-token-costs
Open

Mattbusel wants to merge 1 commit into
simonw:mainfrom
tensorust-ai:docs/plugin-directory-llm-token-costs

Conversation

@Mattbusel

Copy link
Copy Markdown

This adds one line under "Extra commands" in docs/plugins/directory.md for llm-token-costs, a plugin I wrote for the cost tracking asked for in #1039 (open since May 2025). LLM already logs input_tokens, output_tokens and token_details for every response, so llm costs prices those rows by model, day, month or conversation, and llm costs estimate prices a prompt across several models before you send it. It splits out cached input (inside input_tokens for OpenAI and Gemini, outside it for Anthropic), bills Anthropic cache writes and long-context tiers at their own rates, and reads both the turns table and the older responses table. Its tests pass on llm 0.27.1, 0.31.1 and 0.37.2 across Python 3.9 to 3.14, and the docs build cleanly with this line. I maintain the plugin and the llm-prices package it gets rates from (both MIT; that package is separate from your llm-prices.com).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant