TokenTelemetry
TokenTelemetry Docs
Configuration

Billing & Cost Modes

How TokenTelemetry classifies sessions as subscription, API, local, or unknown — and how to override the detection per agent.

TokenTelemetry attaches a billing mode to every session to help you understand the nature of the cost. The mode is a label only — it never changes the token math or the API-equivalent cost calculation.

Billing modes

ModeMeaning
subscriptionSessions billed via a flat monthly subscription (e.g. Claude Pro, Copilot)
apiSessions billed per-token via an API key (e.g. direct Anthropic API, OpenAI API)
localSessions run on a local model (Ollama, llama.cpp, etc.) with no per-token cloud cost
unknownMode could not be determined

The billing mode affects how the cost column is interpreted:

  • api sessions show an exact API-equivalent cost based on current model pricing.
  • subscription sessions show an API-equivalent cost too, but it's labeled as an estimate — your actual cost depends on your subscription plan and usage tier.
  • local sessions show electricity cost (if configured) and an API-equivalent "what this would have cost" figure.
  • unknown sessions show an API-equivalent estimate.

Auto-detection

TokenTelemetry detects the billing mode for each agent automatically:

AgentDefault mode
Claude Codesubscription (Claude Pro) or api (API key) — detected from auth config
Codexsubscription (ChatGPT Plus) or api (OpenAI API key)
Gemini CLIapi
GitHub Copilotsubscription
Cursorsubscription
OpenCodeapi
Qwen CLIapi
Vibelocal (if using a local endpoint) or api
Antigravityapi
Grok Buildapi
DeepSeek Harnessapi (bring-your-own-key; a session can route to several providers)
Qodersubscription (credit-metered; see below)
ZCodesubscription (Z.ai coding / start plan)
Kimi Codesubscription (Moonshot membership allowance)
Hermes Agentapi or local depending on provider config

Detection is best-effort. If the agent's auth configuration can't be read, the mode defaults to unknown.

Qoder bills in credits, not tokens

Qoder is the one agent that records no token counts at all. Every turn it writes carries a usage block whose input, output and cache counters are all zero, and puts the real figure in credits — its own billing unit.

That is not a gap TokenTelemetry can fill. The context ratio Qoder reports has no denominator anywhere on disk, and its model catalogue is encrypted at rest, so neither the token counts nor a real model name can be recovered offline.

So a Qoder session shows 0 tokens and $0.00, which under subscription is the correct reading rather than a missing value, and the credits it actually spent are shown instead: on the agent's page, and in the trace header as CREDITS, with DELEGATED alongside it when subagents did part of the work. Qoder publishes no credit-to-currency rate locally, so TokenTelemetry does not convert credits to dollars rather than guess a rate.

Because Qoder contributes zero to fleet-wide token and cost totals, cross-agent comparisons understate it. That is accurate, but worth knowing before reading a leaderboard.

Manual override

If auto-detection gets it wrong, you can override the billing mode for any agent in Settings → Billing or by editing ~/.tokentelemetry/billing.json directly:

{
  "cursor": "subscription",
  "opencode": "api",
  "vibe": "local"
}

Valid values are subscription, api, local, and unknown.

The override applies to all sessions from that agent — there's no per-session override.

"Label only, never changes the math" caveat

The billing mode is purely informational. It does not affect:

  • The token count shown for a session.
  • The API-equivalent cost shown in the cost column.
  • Analytics totals.

If you're a Claude Pro subscriber, your actual bill doesn't change based on token usage (within plan limits), but TokenTelemetry still shows you the API-equivalent cost as a reference — it's a useful signal for understanding how much value you're getting from your subscription vs what you'd pay on the API.

Where settings are stored

Billing mode overrides are stored in ~/.tokentelemetry/billing.json. The file is created the first time you save an override.

On this page