Skip to main content

Explore model spend

When your organization routes its AI traffic through the RTK proxy, Analytics shows what was spent on models, where it went, what was wasted and what could be saved.

Everything on these pages is the traffic that went through the proxy. It is not your provider's invoice: traffic that bypasses the proxy is not in it. Spend from a source an administrator has excluded is not shown anywhere in Analytics until it is allowed again, so totals can be lower than your provider's bill.

Choose what you look at​

The top bar sets the scope of the whole page:

  • My activity or Organization
  • All projects, one workspace or one project
  • one team, or all teams
  • the dates

Reset appears as soon as something is narrowed. One click goes back to the whole organization, every project and every team. The dates stay.

At a glance​

The top of the page is a row of tiles, each with a label and a figure: Top project, Top model and, when they apply, Top developer, Largest rise, Bought nothing and Could be saved. Hover a tile to see the detail; click it to open the matching view. A tile with nothing to show is hidden.

Below them, Spent, Saved by RTK, Per developer and, when there are any, Fixes available are clickable too. Their hover card says how the figure is obtained: Measured for the spend, Same trajectory for the savings.

Where it went​

The Where tab is a table of the spend in your scope. Pick how to split it: by project, team, developer, repository, model, agent, session, request class or prompt.

A request class is what each request was doing, as declared by the coding agent: the developer's own turn, a sub-agent, a workflow, a conversation summary or a small side request.

  • Open a row. Click a row to keep only that row's spend, then split it another way. For example: Teams, click Backend, then Developers, click a developer, then Sessions. The path above the table takes you back to any step.
  • Unassigned. Spend with no project, no team or no repository is grouped in an Unassigned row. Open it to see which developers and repositories produce it, so you know what is left to map.
  • Assigned. The percentage above the table is the share of the spend shown that is assigned in the current split. It tells you how much of the total a per-project or per-team figure covers.
  • Search and pages. Search by name; use the arrows when there are more rows than one page.
  • Full table adds cost per developer, a month-end projection, sessions, cache rate, top model and tokens. A column with nothing to show is hidden.
  • A session opens on its own page with every request, its model, tokens and cost.
  • Saved. A row's saved figure includes what rtk removed from the command outputs of its sessions, so the rows add up to Saved by RTK. Commands run outside a coding-agent session count in Saved by RTK only. Request class and prompt rows show the proxy's savings only.

A click in the table changes the table only. The figures at the top of the page and the timeline keep following the top bar. The timeline is coloured by the split you are looking at.

A team is one of the groups (custom roles) your administrators define. A developer who belongs to several teams counts in each of them, and the page says so when it happens. The repository of a request is known from the day your proxy, or each developer's RTK when you use the local daemon, runs a version that records it; earlier traffic shows as Unassigned in the repository split.

Waste​

The Waste tab lists only spend that demonstrably returned nothing, largest first, each with its dollar amount:

  • MCP servers loaded in every request and never called
  • skills listed and never invoked
  • requests that ended in an error or were interrupted
  • compression that cost more than it saved

Very large file reads and unusually expensive sessions are not waste: large reads are part of the cost explanation in the Why tab, and expensive sessions are found by splitting the Where table by session.

A line appears only when it reaches 2% of the spend in your scope and period, so the tab holds what is worth cleaning. Below that, the tab says no waste was found.

Optimizations​

The Optimizations tab estimates what could be saved:

  • sub-agent and compaction requests running on your most expensive model while a cheaper one is already in use; the line names the request class, the model and the cheaper model the requests are repriced at
  • a project that reads much less from cache than the rest
  • a project with no saving pipeline while other projects have one
  • developers on an older RTK version

These are estimates for the period shown, on a stated assumption: the same requests at a lower price or rate. They are not savings already made, and they are not added to Saved by RTK, which only counts what was really saved.

Saved by RTK is a net figure. When the proxy compresses content and the model asks for it back, the proxy makes an extra model call that your provider bills. That cost is subtracted from the savings and shown as its own line in the Saved card, so compression can show a loss. It is also why the spend shown here can be slightly higher than the cost your coding agent reports for the same session: the agent does not see those extra calls.

Saved by RTK counts what your agent would have read. When rtk shortens a command output that your agent would not have shown in full, the command saving counts only the part the agent would have read. Claude Code, for example, shows a successful output longer than 30,000 characters as a preview of about 2,500 characters. Agents often read the full output back from the file Claude Code saved, in extra requests; rtk's shorter output, shown in full, avoids them. The Saved card shows this as its own line, Follow-up reads avoided (estimated), based on how often your organization's agents read such files back over the last 30 days, how much they read and what the extra requests cost. Until 20 previews have been seen, the whole part that was cut counts. For members on the RTK proxy or the local daemon, whether the command succeeded is read from their requests; for others, the larger saving counts.

A command saving counts every time it would have been paid. Your agent sends the whole conversation to the model on each request, so an output that rtk shortened is cheaper on the request that first carries it and on every later request that carries it again. For members whose traffic goes through the RTK proxy or the local daemon, each saving is priced on those real requests, at what each one paid: the cache-write price the first time, the cache-read price afterwards, and the cache-write price again after a cache miss, on what that request wrote again. A request that billed nothing adds nothing. Savings are converted to your provider's tokens first. Counting stops when the conversation is compacted. Because of this, the saving of a past day keeps growing while its session is still open. For other members, a saving is counted once, at the model's input price.

Each line is marked measured or estimated. Waste and optimizations are computed from request details, which are kept for your plan's retention period; when your dates go further back, the tab says from which day it counts.

Export​

The ⋯ menu above the table (Export CSV, Export JSON) downloads the scope and dates of the page as CSV or JSON lines: one line per day, project, repository, developer, model, agent and request class, with requests, errors, tokens, cost and the amount saved by the proxy. Column names are stable, dates are ISO, and costs come in dollars and in millionths of a dollar in CSV, in millionths of a dollar only in JSON lines.

  • You need the Export analytics permission.
  • The file contains what you are allowed to see on the page, nothing more. Developer names and teams are included only if you may see other people's activity.
  • A teams column lists the teams of each developer, so you can total by team yourself.
  • Exports are recorded in the audit log.

Reports also show the model spend of the report period and can export the same lines.

Who sees what​

Analytics follows your role. A member without analytics access sees their own activity only. A member with access to some projects sees those projects. Splitting by developer, session or prompt, and opening someone else's session, need the activity permission.