Why attribution is usually a reconstruction
The invoice’s problem
One number per provider. One key per team at best, one shared key at worst. Who spent what is written down, if anywhere, in each team’s own logs.
A provider’s invoice is one number. Behind it, each team holds its own key, or several teams share one, and the question of who spent what is answered by collecting each team’s logs, if they were kept, and reconciling them against the invoice, if the totals allow it. A shared key makes the question unanswerable. A key per team answers it only as well as each team’s logging does, and only until someone asks about a user rather than a team.
Attribution done afterwards is attribution done by whoever has time to do it. The invoice arrives monthly. The request that spent the tokens carried an identity at the moment it was made, and nothing wrote it down.
Every token spent has an owner
Every request that reaches a provider through PreRoute arrived with an identity: the credential the organisation issued to the application, verified before any processing began, naming the tenant it belongs to, the application, the user where the credential names one, and the grant it acts under. Only a request the organisation has accepted can spend tokens at all. The identity is checked at the edge, carried through the pipeline, and written into the audit record of the call the request became.
The owner is written into the audit record at the moment of the call.
What the audit record holds, per call
Recorded on every provider call
-
The identity
The tenant, the application, the user and the grant the request arrived under.
-
The tokens
Input and output, as the provider reported them.
-
The provider and the model
Which one answered, and which model it ran.
-
The attempt
One audit record per attempt, including an attempt that failed after it reached the provider.
Where each part comes from
-
From the verified credential
Never from the request body. A body that names a different tenant is refused, not believed.
-
From the provider’s own report
When a provider reports no usable count, the audit record says so and why, rather than writing a zero.
-
From the routing decision
The candidate that was selected under policy, the same way for every request.
-
At the moment of the call
Written as it happens, with a trace id the gateway minted and your own correlation id if you sent one.
Who spent what, on which model, under which application, stops being a reconstruction and becomes a lookup: by tenant, by application, by user where one is named, by grant, for any period you keep the records, from the same audit trail that holds every allow and every deny.
Counts, not prices
Left to finance, on purpose
- Prices and currencies
- Budgets in money
- Reports and dashboards
The gateway counts tokens. It does not price them. There is no rate card in it, no currency and no cost figure, and that is a decision rather than a gap: the gateway sees tokens and finance sees money, and a price list in the request path would be a second source of truth for a number finance already owns. What flows out is the token counts and the provider and model identity, on the audit stream, for the organisation’s own tooling to join against its own rates.
The limits that do exist are in the gateway’s own units. A token quota per tenant, with a cap per identity inside it, both opt-in and checked before the call is made. Request rate limits per application identity and per tenant. A per-tenant cap on concurrent requests. Each is enforced before a token is spent, and each is a bound on consumption, not a bill. Operator metrics carry the tenant, the provider and the model, never a user, an application or a request identifier: those live in the audit record, where access is governed, and nowhere else.
That is what PreRoute is built for: the control plane every AI request passes through, where the identity that spends a token is verified before the call and written into the audit record of it.
Read next
- By refusing every route that leaves the regions you have set.
How does an AI gateway keep data in the EU?
- An AI gateway is the one point every AI request passes through.
What is an AI gateway?
- Deny-by-default: nothing leaves without a rule that says it may.
What does deny-by-default mean for AI use in an organisation?
- No. The policy decision comes before the model, and no model’s answer takes part in it.
Should an AI policy decision be made by an AI model?
- Rules central, products local: the split that lets both sides do their job.
Who should own AI governance, a central function or each team?
- Yes, as a deployer. What it asks of you follows the use, and the first duties already apply.
Does the EU AI Act apply to an organisation that uses AI agents?
- Yes, from August 2, 2026. The hard part is knowing which outputs that covers.
Must you tell people they are interacting with an AI agent?
- Yes. Pseudonymised data is still personal data, and that is the useful answer.
Is pseudonymised data still personal data under GDPR?
- Yes. Your applications call one API, and which provider answers is the deployment’s decision, not theirs.
Can you change AI provider without rewriting your integrations?
- August 2 is not the deadline that got postponed.
Was EU AI Act Article 50 postponed by the Digital Omnibus?