Check your AI features before the bill does
The IntentiAI cost audit reads your repository, finds every call to a language model, and flags what makes the bill grow or the feature break: loops with no limit, endpoints anyone can call with no spending cap, retired and oversized models, and answers you pay for twice. It is free, open source, and runs on your machine.
npx intentiai auditChecks every AI call in the repository. To check only the AI calls in the change you are about to push, run npx intentiai: it runs the same rules as part of the review. Node 20 or later and a free account. No API key. See a sample report.
What it looks for
Every rule describes a pattern that has cost real teams money, and most cite the research behind them. Each one has its own page with an example and the fix.
- No spend cap on LLM callsNo dollar or token cap anywhere on the path to a paid call.
- Rate limiter that only exists when env vars are setA spending or abuse guard that only exists when certain env vars are set.
- LLM call with no output token limitA call with no output cap on a model where long answers are expensive.
- Frontier model used for a short, simple taskA frontier model doing a short, simple job where a cheaper sibling is likely enough.
- Retired or soon-retired modelA call names a model its provider has retired, or will retire within 90 days.
- Agent loop with no iteration limitAn agent or tool loop with no iteration limit.
- Retries on a paid call with no cap or backoffRetries on a paid call with no cap, no backoff, or both.
- Async generation job polled with no deadline or cancelA billable job polled with no deadline and no way to cancel it.
- Full chat history re-sent on every turnThe whole conversation re-sent on every turn, so cost grows with its square.
- Scheduled job that calls a model on a timerA scheduled job that calls a model whether or not anyone is using the app.
- Images sent to a model in a loop at full resolutionImage or vision calls inside a loop with no limit on how many.
- High reasoning budget on a call that runs many timesA high reasoning budget on a call that runs many times.
- One request that triggers many model callsExtra model calls (moderation, titles, summaries) multiplying every request.
- Gemini context cache created and never deletedProvider-side caches created and never deleted, billed by the hour.
- Prompt cache breakpoint on text that changes every callPrompt caching on text that changes every call, so you pay to write and never read.
- Same deterministic call paid for on every requestThe same deterministic call paid for again on every duplicate request.
- Bulk work sent one call at a timeBulk work sent one call at a time where a batch API costs half.
- Fallback model that never switches backA fallback to a pricier model that never switches back.
- Request fields passed to a paid call without validationRequest fields reaching a paid call with no validation.
- Public endpoint that spends your model budgetAn endpoint anyone can call that spends your model budget.
- LLM API key shipped to the browserA provider key shipped to the browser.
- Provider API key committed in sourceA provider key committed in source. The key is masked in every report.
How it works
- Scan.
npx intentiai auditfinds each model call and the code around it: loops, retries, schedules, request handlers, guards. - Price. Each finding is estimated against current public pricing for the model it calls, and a cheaper model is suggested where one fits. A problem with no ceiling gets a cost per request, never a monthly total.
- Second look. If Claude Code, Codex or Gemini CLI is installed, it reviews every AI call read-only: what triggers it, who can reach it, the model it really uses, and what limits it.
--no-agentskips this. - Report. You get a plain summary in the terminal and the full report in your account: what could happen, how to fix it, and a fix prompt for every issue. The upload is findings and the AI’s notes, no lines of code. Add
--localto upload nothing.
How it stays honest
It is a static audit, so it cannot see real traffic, and a clean result is not a guarantee. Every dollar figure is a rough estimate with its assumptions next to it. The rules are tuned to be right when they fire rather than to fire often, and languages it cannot read are named in the report instead of silently skipped.
Questions
How does the cost audit find model calls?
It reads your source statically. It recognises the official provider SDKs, LangChain, LiteLLM, the Vercel AI SDK, Spring AI, LangChain4j, LangChainGo and plain HTTP calls to provider endpoints, then checks each call site against 22 rules.
Do I need an API key or production traffic?
No. It runs on your machine against the code in your repository, before anything is deployed. Estimates use public pricing, not your usage data. You need only a free IntentiAI account, which keeps each audit in your project's history.
Does it use AI?
Yes, your own. The rules run first, with no model. Then, when Claude Code, Codex or Gemini CLI is installed and you run it in a terminal, that agent reviews the result read-only. On a subscription this costs nothing extra; with an API key it uses your API credits. For every AI call it says what triggers it, who can reach it, which model it really uses and what limits it, and it confirms or rules out each finding. Add --no-agent for the rules alone.
What does it upload?
Its findings and the AI review's written notes, to your account, in the same project as your other runs. The upload holds no files and no lines of your code; an issue's text may name a function, a file or a setting. --private replaces those names with made-up ones before upload, and --local uploads nothing. The AI review itself runs in your own coding agent, which sends code to its provider (Anthropic, OpenAI or Google) under your account.
Which languages does it support?
TypeScript, JavaScript and Python get every rule with a real parser. Go, Java, Ruby and PHP get every call site and the 8 rules that need no deeper analysis. Other languages are counted and named as not scanned.
How is this different from LLM observability tools?
Observability tools such as Langfuse or Helicone measure traffic after you deploy. The cost audit reads code before you deploy, so it finds a loop with no limit before it runs. The two work well together.