Skip to Content
AI GatewayLLM Audit & Analytics

Model call audit

Every model call through the gateway is recorded as a Model Call event you can review in Agent Trail.

When a rule blocks a model call or a provider fails one, you need a record of who called which model and what happened. The gateway records each model call it handles as a Model Call event in Agent Trail, including calls a rule denied.

What a record holds

Each record names the agent instance, the user, the model, when the call started, and how long it took. When a model rule decided the call, the record names that rule. When a data protection rule blocked the call, it names that rule instead. When a usage limit refused the call, it names the limit. When a route sent the call to another model, the record shows the model that served it and "(requested …)" with the model the client asked for. The outcome is one of completed, denied, rate limited, upstream error, client cancelled, or gateway error. Agent Trail highlights a model call that a rule or a usage limit refused or that no Model Providers connection serves, and one that failed at the provider or in the gateway. A stream that stops partway is still recorded. A record holds the prompt only when an active audit policy covers the call and the gateway sent it to the model provider.

Find model calls

Open Agent Trail to see model calls beside tool calls and connections. On a user's page, the LLM Usage tab links to an agent's gateway calls in Agent Trail, refused ones included. Model calls also count toward LLM usage on Cost & Adoption, and a session the gateway served counts once.

Which model calls count toward usage

A completed model call always counts. Any other model call counts the tokens the provider reported for it, which are the tokens usage limits charge. A model call refused before it reached the provider reports no tokens, so it never counts. When a client cancels a stream before the provider reports its final usage, a usage limit can charge an estimate that Cost & Adoption doesn't show.

To change which calls are denied, edit your model access rules.

On this page