DEV Community

Cover image for LLM API Tokens burning your Bank even on testing ? Not anymore, cuesheet is here to help with that.
Georgios Moustakas
Georgios Moustakas

Posted on

LLM API Tokens burning your Bank even on testing ? Not anymore, cuesheet is here to help with that.

Tests that called #Claude in CI were quietly burning tokens and breaking on every other run.

So I built cuesheet.

One decorator around your test. The first run hits the real API and saves the response to a YAML file you commit to your repo. Every run
after that replays from the file. Byte-identical, no network, no cost.

It works with any Python SDK that sits on httpx, which is most of them in 2026. #Anthropic, #OpenAI, #Google Gemini, #Mistral AI, #DeepSeek AI, and more, Together.

The pytest plugin auto-discovers cassettes in tests/cassettes/. Streaming responses get recorded as raw SSE chunks and replayed in order. API keys, JWTs, and emails are scrubbed before write so cassettes are safe to commit.

There is a local web UI too. Dark + ochre, watches the filesystem, refreshes live as your tests record new conversations. Useful for code review and for the "what did the model actually say" moment.

v0.2.0 is out today.

GitHub: https://github.com/gmoustakas/cuesheet
Project Details: https://www.georgemou.gr/projects/cuesheet

Open source, MIT. If you have been writing LLM tests and quietly hating it, this might give you a few hours back.

Top comments (0)