Skip to content

docs(prometheus): document per-token-type detail metrics (LIT-3220) - #179

Merged
ishaan-berri merged 1 commit into
BerriAI:mainfrom
oss-agent-shin:docs/lit-3220-token-detail-metrics
May 20, 2026
Merged

docs(prometheus): document per-token-type detail metrics (LIT-3220)#179
ishaan-berri merged 1 commit into
BerriAI:mainfrom
oss-agent-shin:docs/lit-3220-token-detail-metrics

Conversation

@oss-agent-shin

Copy link
Copy Markdown
Contributor

Summary

Documents the five new sparse Prometheus counters introduced in BerriAI/litellm#28372 (LIT-3220):

  • `litellm_input_cached_tokens_metric`
  • `litellm_input_cache_creation_tokens_metric`
  • `litellm_input_audio_tokens_metric`
  • `litellm_output_reasoning_tokens_metric`
  • `litellm_output_audio_tokens_metric`

Adds a Token type detail metrics subsection under Virtual Keys, Teams, Internal Users in `docs/proxy/prometheus.md` with:

  • Source field on the `Usage` object for each metric
  • Typical providers that populate each field (OpenAI prompt cache / audio, Anthropic prompt caching, DeepSeek, reasoning models)
  • PromQL examples for cache-hit ratio and reasoning-token share
  • A note distinguishing provider-side cached input tokens from LiteLLM's own response-cache `litellm_cached_tokens_metric`

The new metrics are additive — existing token total counters are unchanged — and sparse (only emitted when the provider reports a non-zero value).

Test plan

  • Markdown renders cleanly in MDX (no broken anchors, no unbalanced backticks)
  • No accidental changes outside the new subsection
  • Docs site preview build is green after merge

Adds a "Token type detail metrics" subsection to docs/proxy/prometheus.md
covering the five new sparse counters added in
BerriAI/litellm#28372 (LIT-3220):

  - litellm_input_cached_tokens_metric
  - litellm_input_cache_creation_tokens_metric
  - litellm_input_audio_tokens_metric
  - litellm_output_reasoning_tokens_metric
  - litellm_output_audio_tokens_metric

Includes:
  - Source field on the Usage object for each metric
  - Typical providers that populate each field
  - PromQL examples for cache-hit ratio and reasoning-token share
  - Note distinguishing provider-side cached input tokens from
    LiteLLM's own response-cache `litellm_cached_tokens_metric`
@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment May 20, 2026 6:34pm

Request Review

@ishaan-berri
ishaan-berri merged commit 4785d18 into BerriAI:main May 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants