Attributing Azure PTU reserved capacity costs with LiteLLM

Attribute hourly Azure PTU capacity charges to owning teams in a self-hosted LiteLLM gateway, enforce each team's share, and confirm the cost model against your invoice.

On this page

Attributing Azure PTU costs with LiteLLM for teams sharing reserved capacity

A platform owner running Azure provisioned throughput receives an hourly bill that does not move with token counts. Teams that send a few large requests and teams that send many small ones pay the same hourly rate for the same reserved capacity, so per-token spend logs alone misstate who is using the deployment. LiteLLM can address this by storing zero per-token pricing on a PTU deployment, so request-level cost calculations record nothing for tokens, and by attributing the hourly capacity cost to the owning team through a daily job. The result is that spend reports reflect the reserved capacity bill rather than an artificial per-token estimate.

Shared PTU capacity needs this split when more than one team draws from the same deployment and finance expects each team to carry a fair share of a fixed hourly cost. A single team that owns its deployment usually does not need it, because the whole bill already belongs to that team. The attribution does not manage capacity on its own. It does not stop a team from exceeding its throughput, does not change what Azure charges, and does not reconcile the result with the invoice. Each share becomes a per-minute ceiling, so the split also needs agreed shares, a review of how idle capacity is handled, and a check against the Azure invoice before any chargeback is issued. Confirm the exact configuration keys and the daily job schedule against the PTU flat cost documentation for your LiteLLM version.

How hourly PTU cost flows from the invoice to team ceilings

The diagram starts with the Azure invoice, which sits outside LiteLLM and serves as the reconciliation reference. The PTU deployment is declared in the gateway with zero per-token pricing, and its hourly capacity cost is split into team shares. A daily attribution job writes each share to the owning team's spend, and each share becomes a per-minute ceiling enforced at the gateway. Check that the hourly cost you declare matches the billed capacity on the invoice.

Hourly PTU capacity cost moves from the Azure invoice into per-team ceilings.

Configuration choices for PTU shares and how each fits

This table compares the main ways to assign a PTU deployment's hourly capacity cost: whole-deployment ownership, shared splits, equal or proportional shares, and a separate per-token overflow deployment. Read each row for when the option fits and what it changes in attribution and enforcement. The main takeaway is that the split method determines who carries idle capacity, so decide that before setting shares.

ChoiceWhen it fitsWhat it changes in attributionWhat it changes in enforcement
One team owns the whole deploymentOne team is the only consumer and accepts all of the capacity costThe full hourly cost posts to that team's ledger, with no split logic to maintainThe team's single share is the per-minute ceiling for the deployment, so its own traffic is the only traffic limited
One deployment split across several teamsSeveral teams draw from the same PTU capacity and you need each team's cost visibleThe hourly cost is divided into named shares, and each team carries its portion each dayEach share becomes a per-minute ceiling, so a team that exceeds its share is limited even if capacity is idle
Equal sharesTeams have similar, predictable demand and a simple split is acceptable to financeEvery team carries the same portion, regardless of how much it sendsCeilings are identical, which can throttle a busy team while a quiet team leaves capacity unused
Proportional sharesTeams have measurably different demand and the split should follow usagePortions track each team's share of the work, so the ledger reflects who drives the capacity needCeilings track the agreed proportions, but the proportions must be reviewed when team demand changes
Separate per-token deployment for overflowPeak demand regularly exceeds reserved capacity and some traffic can pay per tokenOverflow posts to per-token pricing, so the reserved share stays a fixed cost and overflow cost is visible separatelyOverflow traffic is not capped by the reserved ceiling, so it needs its own budgets or per-key limits
Idle capacity handlingReserved capacity is often underused in some hours and fully used in othersDecide whether idle cost stays with the owning team, goes to a shared platform line, or is split by the same sharesConfirm how an unused share is treated in the ceiling, since a fixed ceiling does not reallocate idle capacity by itself

Setting up PTU deployments, shares and enforcement in LiteLLM

This sequence turns an hourly Azure PTU bill into team-level attribution and per-minute ceilings in LiteLLM. When it is finished, each team's share is recorded, attributed daily, and enforced at the gateway.

  1. Confirm the PTU deployment and hourly cost

    The platform team pulls the Azure billing record for the provisioned throughput deployment and notes the deployment name, region, PTU count and hourly cost. Compare the hourly rate against one hour of the invoice line for the deployment, not against per-token usage figures. Done when the hourly cost you will declare in LiteLLM matches the billing record for a sampled hour and the deployment identifier matches the Azure resource exactly.

  2. Register the deployment with zero per-token pricing

    The platform team adds the PTU deployment to the LiteLLM model configuration with its input and output per-token prices set to zero, so token usage does not add a second charge on top of the capacity cost. Follow the PTU flat cost guidance for the exact settings, which you should confirm against the LiteLLM version you run. Done when the model entry shows zero per-token prices and a test request through the gateway is logged with zero token cost.

  3. Declare the hourly capacity cost

    Using the hourly cost recorded in the first step, the platform team sets the flat hourly capacity cost on the deployment in LiteLLM, using the setting named in the PTU flat cost documentation. Record who approved the figure and the date it was taken from the billing record, so a later reviewer can trace it. Done when the configured hourly value matches the billing record and a second reviewer has checked it against the same invoice line.

  4. Define team shares that sum to the whole

    The FinOps or platform owner assigns each consuming team a share of the deployment and makes sure the shares add up to the full deployment, with no unexplained remainder. Decide in advance whether unused headroom is assigned to a shared or platform owner. Each share also becomes that team's per-minute ceiling, so the figures should reflect what each team is expected to use. Done when the shares total exactly the whole deployment and the allocation is saved in the reviewed configuration.

  5. Confirm the daily attribution job runs

    The platform team checks that the scheduled daily job attributes the hourly capacity cost to the owning teams and that it completes without errors in the logs. After the first run, compare each team's attributed amount with its share multiplied by the hourly cost and the hours in the period, then check that attributed totals equal the deployment's full cost for that day. Done when the job log shows a successful run and the per-team totals reconcile to the billing record within a tolerance you agree with finance.

  6. Verify that a team at its ceiling is blocked

    In a non-production environment, the platform team sends test requests with one team's virtual key until it exceeds its per-minute ceiling, and confirms the gateway rejects the excess requests. Then send a request with another team's key to confirm that team is unaffected. Check that the blocked requests appear in the logs with the reason recorded. Done when the over-limit team is blocked, the other team's traffic still succeeds, and the test results are saved with the configuration for audit.

What changes the cost model for finance and platform teams

Finance teams need to know that the PTU attribution in LiteLLM is a model of the invoice, not the invoice itself. The hourly reserved capacity charge from Azure is the number to match, and LiteLLM spreads that charge across teams according to the shares you declared. Token-level spend will look near zero for PTU traffic because the deployment carries no per-token price, so a reviewer who compares token counts against the bill will find a gap that the design intends.

  • Source of truth: The Azure invoice line for the PTU deployment is the figure to reconcile against, not the sum of per-request spend logs.
  • Attribution basis: Each team's share is a fixed split of the hourly capacity cost, so the allocation changes only when a share is edited.
  • Timing: Attribution runs on a daily job, so expect a lag between an hour of capacity cost and its appearance in team totals.
  • Unallocated capacity: Confirm how idle or unused capacity is handled, since it may remain unassigned or be spread across teams depending on your declared shares.
  • Currency and rate changes: Ask how a changed Azure rate or a change in billing currency is recorded, and whether past periods are restated.

Before the first monthly close, ask the platform team to produce a worked reconciliation for one day of capacity against the invoice line.

Security and operational risks in PTU cost attribution

PTU attribution changes what a team pays, so errors in the hourly cost or the shares show up directly in chargeback and in enforced ceilings. The cards below cover the failure points we see most often, from stale cost data to credentials and admin access, and each one names a check to run before and after go-live.

Stale hourly cost after a capacity change

When you add or remove PTU capacity in Azure, the hourly cost declared in LiteLLM stays at the old value until someone edits it. Every hour after the change is then attributed at the wrong rate. Treat a capacity change as a change request that updates the deployment's declared units and hourly cost in the same step, and reconcile the first full invoice cycle against the Azure bill for that deployment.

PTU flat cost docs

Shares that do not sum to the deployment

A single PTU deployment can be split across several teams, and each share becomes a per-minute ceiling. If the shares add up to less than the full capacity, part of the cost is never charged to anyone. If they add up to more, teams are capped below what they were promised and the overage is attributed twice. Check that shares total the declared capacity before saving, and review the total whenever a team is added or removed.

Daily job lag against hourly billing

Azure bills PTU capacity by the hour, but the attribution job runs once a day. Between runs, spend views and enforced ceilings reflect the previous day's allocation, so a team that expanded its share mid-day may run over its intended ceiling until the next run. Confirm the job time, agree which day's figures finance uses for close, and document the lag so nobody reads a same-day number as final.

Edit access to cost fields

The fields that hold hourly cost and team shares decide what each team is charged. Anyone who can edit them can move cost between teams without a trace in the invoice. Limit write access to the platform team and finance approvers, route changes through the admin interface with audit logging turned on, and review who holds those roles. Enterprise features such as audit logs and organization and team role-based access control are available in the Enterprise edition.

LiteLLM Enterprise docs

Azure credentials outside the secret manager

The gateway needs Azure credentials to run its deployments, and a copy in a config file or environment variable is a common exposure. LiteLLM's production guidance is to keep the master key in a secret manager and to use one secret source for provider credentials. Store Azure keys there as well, rotate them on a schedule, and confirm that the master key begins with sk- and is never written into the attribution configuration.

Production best practices

Questions teams ask before attributing PTU costs

How much effort does a PTU cost attribution setup take?

Effort depends mostly on how many PTU deployments you have, how many teams share each one, and how clean your capacity records are. A single deployment with one owning team is a small configuration task inside LiteLLM. Each additional deployment and each split share adds a declaration to check, and the hourly cost of each deployment must be confirmed against your Azure agreement before anything is enforced. The largest unknown is usually the records themselves: if nobody can say which PTU units were bought, for which region, and at what hourly rate, that discovery work comes first. Ask any partner to size the effort from your deployment count, split count and the state of your billing exports, and to list which of those items they will verify.

Can our own engineers set up PTU cost attribution without outside help?

Yes, if your team already runs LiteLLM with PostgreSQL, understands its virtual keys and team budgets, and can read Azure billing data. The LiteLLM PTU flat cost approach stores zero per-token pricing on a PTU deployment and uses a daily job to attribute the hourly capacity cost to the owning team, so the mechanics are configuration rather than custom code. The harder parts are agreeing team shares with finance, deciding how unused capacity is treated, and checking the output against the invoice. Teams without a platform owner for LiteLLM often find those governance steps take longer than the configuration itself. An outside partner is most useful when you need the design, the reconciliation evidence or the enforcement tested before finance relies on it.

What does the work need from our team?

Plan for three inputs before the build starts. First, read access to the Azure billing data or invoices that show the hourly cost of each PTU deployment, including the reserved capacity and the region. Second, capacity records: the PTU units purchased, the deployment names they map to, and the start and end dates of each commitment. Third, a named owner for each team that will receive a share, with someone who can approve the split and accept the resulting per-minute ceiling. Finance usually needs to sign off on the allocation rule, such as whether idle capacity is charged to a shared platform budget or spread across teams. Missing any of these three inputs usually shows up later as a disputed number, not as a technical failure.

How long does reconciliation take to settle?

Reconciliation settles when the LiteLLM attribution for a stable time window matches the Azure invoice within a tolerance your finance team has agreed. The duration depends on your billing cycle, on how quickly Azure invoice data becomes available to you, and on whether the capacity commitments changed during the period. Choose a closed billing period for the first comparison, not a current month that is still accruing. Expect at least one round of investigation where differences come from timezone boundaries, partial hours at deployment changes, or a mismatch in the hourly rate recorded. Ask a partner to state which period they will reconcile first and what tolerance they propose, rather than accepting a general promise that the numbers will match.

What does a fixed-scope engagement cover for PTU attribution?

A fixed-scope engagement is agreed in writing before work starts, so the scope, deliverables and timeline are fixed on paper. For this topic, that normally covers declaring the PTU deployments and their hourly costs in LiteLLM, defining team shares, configuring the daily attribution job, enforcing each share as a per-minute ceiling, and reconciling a closed billing period against the invoice. It should also name the documentation handed over and the operating steps your team takes afterward. Items usually outside the base scope include changes to Azure agreements, new deployments added later, and ongoing monitoring, which can be covered by a retainer. Ask for the written scope to list each deliverable, the reconciliation period used, and what happens if a difference is found.

What breaks most often in a PTU attribution setup?

The most common failures are configuration mismatches rather than software faults. A PTU deployment left with per-token pricing will double count or under count cost. Shares that do not add up to the deployment's hourly cost leave gaps, and a per-minute ceiling set too low will block legitimate traffic at peak. Time boundaries also cause differences: the daily job and the invoice may use different time zones or cut-off hours. Check that every PTU deployment has zero per-token pricing, that the shares total the full hourly cost, and that the ceilings were tested against real traffic patterns before enforcement is switched on. Keep a short change log for each deployment so that a later capacity change does not silently break attribution.

Does PTU attribution change what data leaves our environment?

Attribution works on cost and usage metadata inside your self-hosted LiteLLM gateway and your own database. It does not require prompts or responses to be sent to DeployOpen or to any third party. Access to Azure billing data and capacity records should be granted to the engagement team on a least-privilege basis, with a named owner who can revoke it. Confirm where the cost exports are stored, who can read the attribution tables, and how long records are retained, because those tables become the source for chargeback decisions. Your security and privacy teams should review the access plan before billing data is shared.

How DeployOpen works on this

DeployOpen scopes PTU cost attribution as a fixed-scope engagement inside your own infrastructure, starting from your PTU contract, your deployments and your team structure. We build the LiteLLM attribution setup, test that each team's share is enforced, and hand over documentation your finance and platform teams can run, with ongoing support available as a retainer.

How we scope

  • Inventory each PTU deployment, its declared capacity and the hourly cost on your Azure invoice before any configuration starts.
  • Agree in writing which teams share each deployment, how the split is calculated and who approves changes to it.
  • Define the per-minute ceilings each team share becomes, and confirm which LiteLLM deployment and database hold the spend records.

How we build

  • Configure the PTU deployment with zero per-token pricing and the declared hourly cost so the daily attribution job reads correct inputs.
  • Test that the daily attribution job assigns the hourly capacity cost to the owning teams and that totals match the Azure invoice for the same window.
  • Check that each team share is enforced as a per-minute ceiling by sending traffic from test keys for every team that shares a deployment.

How we hand over

  • Deliver the configuration as code, with a written record of each deployment, its capacity, its hourly cost and its team split.
  • Provide a reconciliation runbook covering how to compare attributed cost with the monthly provider invoice and what to do when they differ.
  • Walk your platform and finance owners through change steps for capacity changes, new teams and rate updates before handover closes.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover, if your team wants DeployOpen to keep the setup current.
  • Re-test attribution and ceilings after each LiteLLM upgrade or when you change PTU capacity, so the split stays accurate.
  • Confirm with your Azure account team and the LiteLLM documentation which capabilities and billing details apply to your tenant before scope is signed.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.