ai newsMo., 26. Okt.
EilmeldungMistral’s Mensch warns Europe of ‘leftovers’ if it quits frontier AI

Find where your LLM API bill leaks—without uploading your logs

An LLM API bill tells you how much you spent. Choosing what to change takes more investigation. Are repeated requests worth reusing? Are prompts actually hitting the provider’s cache? Are failed or truncated calls still adding to the bill? We built Linklbee Scan , an open-source Python tool that re

dev.toMontag 11:57 · 26.10.2 Min. Lesezeit
Bild: dev.to

An LLM API bill tells you how much you spent. Choosing what to change takes more investigation.

Are repeated requests worth reusing? Are prompts actually hitting the provider’s cache? Are failed or truncated calls still adding to the bill?

We built Linklbee Scan, an open-source Python tool that reads existing usage logs on your machine and generates an HTML report to help answer those questions.

No API key, no model calls, and no log uploads. It uses the Python standard library and runs on Python 3.9+.

Install the scanner and run the built-in demo:

pip install linklbee-scan linklbee-scan --demo --lang en Enter fullscreen mode Exit fullscreen mode The demo uses a synthetic example log. It lets you inspect the report format before using your own records; its figures are not customer savings results.

linklbee-scan calls.jsonl --lang en --out report.html Enter fullscreen mode Exit fullscreen mode You can also pass a folder instead of a single file.

Before interpreting a report, check how your fields are mapped:

linklbee-scan calls.jsonl --peek --lang en Enter fullscreen mode Exit fullscreen mode This reads the first 200 records and prints the field mapping without writing a report.

That matters because different logging systems capture different information. Token counts can tell you about spending, but they cannot answer every question about repeated requests or shared prompt prefixes.

Depending on the fields available, the scanner checks patterns including:

Each check is marked as found, none, or needs more data. When a required field is missing, the report names it rather than guessing.

A finding gives you something to investigate. For example:

Then compare cost, quality, and latency on representative tasks. Estimated savings in a report and savings measured after an application change are different things.

The scanner reads JSONL, JSON arrays, CSV/TSV,.log, and.gz files. It includes mappings for common provider responses and exports from tools such as Langfuse, LangSmith, Helicone, and LiteLLM.

Processing stays on your machine. The generated report contains aggregate figures rather than prompt or answer text.

The project is MIT-licensed and published by NOTEGG, the team building Linklbee.

Source and usage instructions: https://github.com/linklbee/scan Linklbee: https://linklbee.com/

If you try it, we’d especially like to know: does the report help you choose a concrete next step? Missing log formats, unclear findings, and incorrect field mappings are useful feedback too.

Quelle: dev.to (dev.to). Original öffnen