Cost Control¶
Cost Control in the LLM Mesh helps you manage your LLM costs by setting alerting & blocking thresholds.
Note
You need a licence with Advanced LLM Mesh to customize quotas. If your license does not include it, you can only set up a single global quota (see Fallback Quota), which is applied to all LLM queries.
Concepts¶
You can set quotas that allow you to track spending and decide whether to block queries once the quota is exhausted.
For each quota, you can specify:
scope: LLM queries matched by the quota. Can be all queries, or matching a filter: LLM provider, DSS project, connections, users… Note that a single query can match multiple quotas.
budget: maximum LLM cost, in US dollars, allocated for the quota.
budget distribution: one shared budget for all matching queries, or a separate budget for each value or combination of values of the selected dimensions.
block queries: whether the LLM queries are blocked once the budget is reached.
reset period: time period over which queries are aggregated, e.g. every calendar month or rolling 15 calendar days.
alerting: optional cost thresholds that trigger an email alert. When set up, you are also notified when the quota becomes blocked.
permissions: granular visibility settings for specific users or groups.
Note
A query can match multiple quotas, in that case all matching quotas see their current spend incremented.
The Fallback Quota applies to queries not matching any other quota. It always has a shared budget distribution.
Separate Budgets¶
For a custom quota, select Separate under Budget distribution and choose one or more dimensions. Each distinct value, or combination of values, gets the full budget amount and its own blocking and alert thresholds. For example, a $100 budget per project and end user gives each project and end-user pair a separate $100 budget.
The available dimensions are:
Dimension |
Description |
|---|---|
Project |
The DSS project containing the query. |
User (runner) |
The DSS user executing the query. |
End user |
The user on whose behalf the query runs, when supplied in the query context. |
End user or runner user |
The end user when supplied; otherwise, the runner user. |
For the End user dimension, queries without an end-user identity share an empty value.
Note
To attribute a query to an end user, a trusted application should set the additional request context’s dkuOnBehalfOf to the end user’s login. DSS uses the supplied value for quota attribution without strict verification of this identity. Agent Hub supplies this context field automatically.
The selected dimensions work together with the quota filter. The filter determines which queries match, and then the dimensions control how matching queries share a budget. A quota can therefore be filtered to one provider while giving each project its own budget for that provider. The quota list shows total spend across the separate budgets. Users with Full visibility can select View details to see the individual spend.
Limitations¶
DSS does not calculate a US dollar cost for these LLM providers:
Amazon SageMaker LLM
Databricks Mosaic AI
Their queries do not increase a quota’s recorded spend. They can still match a quota through another filter, such as a DSS project. A blocking quota with a zero budget, or one exhausted by other queries, blocks them.
Snowflake Cortex and local Hugging Face models participate in cost limiting. Their recorded spend depends on the estimated costs configured for the model; when no cost is available, queries do not increase the US dollar spend.
Permissions and Visibility¶
Only Administrators can create, update, or delete quotas. They can also grant visibility to other users or groups to help them monitor their own consumption.
Visibility Level |
Access Details |
|---|---|
Full |
Complete read access, including the total quota amount, real-time cost progress, and configuration details (filters, alert emails, etc.). |
Basic |
Limited access showing only the quota status (Blocking/Non blocking, Active/Exhausted), reset period, and the percentage of progress. |
Note
Granting Full access may expose sensitive information, such as email addresses used for alerts, specific spend amounts, or object identifiers used in custom filters.
Users or groups granted visibility can monitor these quotas by navigating to Administration > Settings > LLM Mesh > Quotas.
Note
Non-admin users will only see the Quotas section, not the rest of LLM Mesh configuration settings.
Setup (Admin only)¶
Administrators can configure, edit, and manage the lifecycle of all quotas within the dedicated Cost Control section, found in Administration > Settings > LLM Mesh.