﻿# Which gateway failures belong in an AI spend report?

LiteLLM v1.108.21 excludes requests refused before authentication from spending records. Check how your gateway dashboards count rejected requests.

Author: Retrivium editorial team
Updated: 2026-11-29
Canonical URL: https://retrivium.ai/journal/daily-20261129-agents-litellm-auth-before-spend/
Language: en

The maintainers published LiteLLM v1.108.21 on November 28, with the same change also noted for v1.111.1. Their patch removes zero-cost spend and daily-usage entries for requests refused before authentication. The maintainer description says refusals after authentication, such as policy or budget decisions, retain their previous treatment, and the client response and error metrics are unchanged. That distinction matters when accounting tables also feed request dashboards.

## Define the denominator for each metric

A cost report usually explains charges for traffic attributable to a key, team or deployment. A service-health chart may cover every attempt reaching the gateway. Label those cohorts directly. Joining spending data to an error chart by request ID can drop failures that have no corresponding usage entry, so build the failure count from the request telemetry first.

## Check an approved staging fixture

Use synthetic, authorized monitoring fixtures for a normal successful call, a post-authentication policy refusal and a pre-authentication refusal. Compare their HTTP status categories, metrics and inclusion in the spend report. Verify the gateway configuration for the branch intended for production. Spend entries should still appear where the branch documentation calls for them, and rejected traffic remains observable through the expected operational channel.

## Explain an apparent change after upgrade

Count records and total spending separately before and after the change. If zero-cost rows decline, overall spending can stay flat while the mean cost per record rises. That change can follow from the database cohort alone. Keep the version or upgrade time with historical charts to avoid attributing the shift to new user activity or changes in model pricing.

## Leave room for unresolved billing

An authenticated request can still fail with a billable operation already underway. Compare usage from the gateway and from the upstream provider for these cases, keeping estimated values separate from confirmed ones. This lets a finance report explain charges while operations staff use the complete request data to investigate reliability.

## Sources

- [Primary source · litellm v1.108.21](https://github.com/BerriAI/litellm/releases/tag/v1.108.21)
- [Primary source · litellm v1.111.1](https://github.com/BerriAI/litellm/releases/tag/v1.111.1)

## Related reading

- [Related guide · Router billing token accounting](/journal/router-billing-token-accounting/)
- [Related guide · Openrouter usage accounting](/journal/openrouter-usage-accounting/)
