Repository navigation
Releases
Releases · ian-abu/llmburn
0.2.0: OpenAI and Anthropic support
llmburn now tracks OpenAI and Anthropic calls as well as Gemini.
pip install "llmburn[openai]" # or [anthropic], [gemini], [all]New
- OpenAI:
chat.completions.createandresponses.create, sync and async, streaming included. The SDK's.stream()helpers are tracked too. - Anthropic:
messages.createandmessages.stream, sync and async. - One budget across providers.
budget_per_userandbudget_totalcount spending from all three SDKs together, so a user who hit their limit on Claude is blocked on GPT too. llmburn.instrument()patches every SDK that's installed and returns their names, e.g.["gemini", "openai"].- Prices for the GPT-6 models and Claude models from Haiku 4.5 up, including cache reads, cache writes (Anthropic 5-minute and 1-hour, OpenAI 30-minute and 12-hour) and long-prompt tiers (GPT-6 above 272k tokens, Claude Haiku 5.5 above 100k).
- More Gemini models:
gemini-4-carbon,gemini-4-hydrogen,gemini-3.6-flash,gemini-3.1-pro-preview-customtools,gemini-robotics-er-2-preview.
Fixed
- Model names like
gemini-2.5-flash-imageandgemini-2.5-flash-preview-ttswere priced asgemini-2.5-flash. A longer name now only matches a known model when the extra part is a version suffix (-001,-20251001,-2024-08-06,-latest,-preview-05-20). Other models are skipped with a warning instead of being mispriced. gemini-2.5-prois priced at Gemini 3.8 Flash rates from December 1, 2026, when Google starts billing it that way.
Notes
- On OpenAI chat streams, llmburn asks for token counts (
stream_options={"include_usage": True}) and hides the extra usage-only chunk, so your code sees the same chunks as before. If you asked for usage yourself, you get the chunk as usual. - Prices are for the standard tier with global routing. Batch, Flex, Fast and Priority modes and regional surcharges aren't applied.
prices.jsonnow useslong_context: {"above": N, ...}in place ofabove_200k. This only matters if you read the file directly.