Policies
A policy defines a spending budget: which models it covers, the amount available, and its priority relative to other budgets. A policy can apply on its own or be combined with a policy assignment. In Governance → Policies, administrators create and manage policies for model calls made by signed-in users.
Policies and Policy Assignments are preview features. The platform team must enable POLICIES_ENABLED in DIAL Admin and use a DIAL Core version that supports policies. The screens are hidden by default. Configuring a policy does not by itself switch on enforcement: see Spending limits.
How policies apply
A budget needs a subject, a cost object, and a set of models:
| Term | What it means |
|---|---|
| Subject | Who can use the budget. Subject rules match the caller's DIAL roles, email, or token claims. For example, roles EQUAL finance matches a user with the finance role. |
| Cost object | The name used to group spending, such as finance-project. For a signed-in user, Core reads the project from the configured identity-provider claim. If the caller has no project, Core uses the default cost object, ORG unless changed by the administrator. A cost object is a spending identifier; it is not automatically a DIAL Chat project. |
| Models | The model deployments the budget can pay for. A policy can cover all deployments or a specified list. |
These budgets apply to model calls authenticated with a user's identity token (JWT). API-key calls use role cost limits instead. Each matching user has a separate counter; the budget is not a shared pool.
Self-applying and reusable policies
Define the subject and cost object once, either on the policy or on an assignment:
- A self-applying policy specifies both and needs no assignment. For example, set the cost object to
ORG, the subject toroles EQUAL finance, and the monthly amount to$25. IfORGis the configured default, each matching user calling a covered model without a project has a separate$25monthly budget. - A reusable policy leaves one or both to an assignment. For example, a global policy can define a
$25monthly amount without subject rules or a cost object. Create an assignment for each grant, specifying its subject and cost object there.
Core considers only budgets for the call's cost object. A call for finance-project cannot use an ORG budget if its project budget is missing or exhausted. See Usage limits and cost control.
Priority
Enter a whole number in Priority when creating or editing a policy. When several budgets match the same caller, cost object, and model, Core tries the lower number first. For example, a budget with priority 10 pays before one with priority 20; Core tries 20 when 10 cannot pay.
Choose different priorities for policies that can cover the same calls in the same cost object. Core rejects a conflicting save when two such policies have the same priority.
Spending mode
The spending mode is a deployment-wide setting, not a control on the Policies screen.
If you cannot access System Properties, ask a full administrator.
Saving System Properties can override file-defined global settings. Before saving a change, read the System Properties warning.
In Enforce mode, a signed-in user's model call is rejected if no budget matches the user, cost object, and model, or if all matching budgets are exhausted. Define the required budgets and check them in Shadow mode before switching to Enforce.
To find the spending mode in DIAL Admin:
- Open System Properties from Quick Actions on the home page or the globe icon in the footer.
- Select Spending Limits, then open the Mode selector.
The Mode selector in Spending Limits offers these deployment-wide options:
| Option | Description |
|---|---|
| Off | Budgets are inactive; role cost limits apply. |
| Shadow | Core evaluates budgets and records their usage, but does not reject calls because of a budget. Role cost limits still apply. Core logs when a budget would have rejected a call, so the platform team can check coverage before enforcement. |
| Enforce | Budgets replace role cost limits for model calls made with a user's identity token. Calls without a matching budget that can pay are rejected. |

Main screen
Open Policies in Governance to browse global policies and policies grouped by cost object. Open a policy from the list to review its budget definition and subject rules.

Folders
Policies are stored in DIAL Core's platform storage:
- A policy with no cost-object folder is a global policy under
platform/. If it leaves the cost object unset, assignments can use it in different cost objects. - A policy in a cost-object folder, such as
platform/ORG/, is a project policy. An assignment can use it only in that cost object. A self-applying policy must also be stored in its cost object's folder.
The folder name identifies the cost object; it is not a folder of user files. The folder is derived from its policy records. To put a policy in platform/ORG/, enter ORG in Cost object when creating it. Leave the field empty to store a global policy at the root. With subject rules, the field also binds the policy to that cost object; without them, an assignment supplies the cost object.
Use the folder tree or breadcrumb path to navigate between platform/ and its cost-object folders. Policies have one cost-object folder level, not an arbitrary folder hierarchy. There is no separate folder-creation action; creating a policy in a new cost object creates its folder in the list.
Grid columns
The Policies grid shows the following columns for the folder being viewed:
| Column | Description |
|---|---|
| Name | Policy identifier or cost-object folder name. Open a policy to review its configuration or a folder to browse its policies. |
| Author | User recorded as the policy's author. |
| Created time | When the policy was created. |
| Updated time | When the policy was last changed. |
Controls
Use Create above the grid to add a policy. Filter the list beneath the column headings, or select rows to use the bulk action:
| Control | Description |
|---|---|
| Create | Opens the policy creation form. Available with write access. See Create. |
| Column filters | Use the search inputs and filter menus beneath the column headings to narrow the visible rows. |
| Reset filters | Clears the grid filters. Appears when a filter is active. |
| Row selection | Select rows to use bulk Delete. Available with write access. See Delete. |
Row actions
With write access, open the actions menu (⋮) at the end of a policy row:
| Action | Description |
|---|---|
| Open in a new tab | Opens the policy configuration in a new browser tab. |
| Duplicate | Creates a policy using an existing policy's settings. See Duplicate. |
| Delete | Opens a deletion confirmation. Core rejects deletion while an assignment references the policy. See Delete. |
Create
Create a policy to define a new budget and its deployment coverage. Set subject rules on the policy when it identifies the callers itself, or leave them for its assignments.
Define the budget
The first step of the Create Policy form contains the policy identifier, storage cost object, and budget fields. Required indicates whether a value is needed to continue:
| Field | Required | Description |
|---|---|---|
| ID | Yes | Unique identifier in the folder determined by Cost object. |
| Cost object | No | Optional folder for a project policy. With subject rules, this also pins the policy to that cost object; without them, the assignment supplies the cost object. Leave it empty for a global policy. |
| Priority | Yes | Whole number. Lower numbers are considered first when matching budgets. |
| Kind | Yes | budget, the supported policy kind. |
| Quantity | Yes | cost, the supported quantity. |
| Applies to | Yes | Select All deployments or Specific deployments. The spending-budget check applies to models. |
| Deployments | Conditional | Enter at least one deployment name when Specific deployments is selected. Hidden for All deployments. |
| Per day | Conditional | Daily spending amount in USD. Required if Per month is unset. An entered amount must be greater than zero; an unset period has no limit. |
| Per month | Conditional | Monthly spending amount in USD. Required if Per day is unset. An entered amount must be greater than zero; an unset period has no limit. |
Creation requires write access. Set at least one positive amount in Per day or Per month before continuing.
To enter a new policy's budget details:
- Open Policies and click Create.
- Enter the policy details described above.
- Click Next to open Subjects.

Set the subjects
The Subjects step uses the same rule editor as policy configuration. Add rules if the policy itself identifies the callers. Leave them empty when each assignment will specify the subject.
To complete policy creation:
- Add subject rules if needed. Use Back to return to the budget details if necessary.
- Click Create. The policy opens for review. Create an assignment if the policy does not apply by itself.

Duplicate
Use Duplicate to reuse an existing policy's budget settings and subject rules under a new identifier. Unlike creating a policy from scratch, duplication retains the original priority and does not copy its assignments.
Duplication requires write access. The new ID must be unique in the original policy's folder.
The duplicate keeps the original priority. Core rejects it if the two policies produce budgets with the same priority that can pay the same calls in the same cost object. In particular, duplicating a self-applying policy can fail before you can edit the copy. In that case, create a new policy with a different priority instead.
To duplicate a policy:
- Open the policy's actions menu (⋮) and click Duplicate.
- Check the proposed ID and change it if necessary. DIAL Admin normally adds
-copy; if the original ID already containscopy, change the proposed ID yourself. - Click Duplicate. On success, the new policy opens. It is stored in the same folder and retains the original's budget settings and subject rules. Review them before using it. Assignments of the original policy are not copied.
Configuration
Open a policy from the list to review its Properties and Subjects. Changes in either section are staged until you click Save; click Discard to abandon them.
Editing requires write access. For a read-only administrator, the form fields and JSON editor are read-only, and mutation controls are unavailable.
The policy configuration header contains the controls for saving changes, deleting the record, and switching its editing view:
| Control | Description |
|---|---|
| Save | Saves staged changes from Properties, Subjects, or the JSON editor. Appears after a change. With JSON Editor switched off, invalid budget fields or subject rules prevent saving. |
| Discard | Restores the saved policy, abandoning staged changes in either configuration section or the JSON editor. Appears after a change. |
| Delete | Opens a deletion confirmation. Available with write access when there are no staged changes and JSON Editor is switched off. See Delete. |
| JSON Editor | Switches from Properties and Subjects to the record's JSON representation. Available when there are no staged changes. See JSON editor. |
Properties
Properties shows the policy's metadata and budget definition. The budget fields are the same as in Create.
In the Properties form below, Required means a value is needed for a valid policy; it does not apply to displayed metadata. Editable describes platform-stored policies with write access and JSON Editor switched off:
| Field | Required | Editable | Description |
|---|---|---|---|
| Maintainer | Not applicable | No | Author recorded in the policy's metadata, when available. |
| Updated Time | Not applicable | No | When the policy was last updated, when available. |
| Creation Time | Not applicable | No | When the policy was created, when available. |
| Priority | Yes | Yes | The order in which Core considers matching budgets; lower numbers are tried first. See Priority. |
| Kind | Yes | Yes | The policy kind: budget, the only supported choice. |
| Quantity | Yes | Yes | What is limited: cost, the only supported choice. |
| Applies to | Yes | Yes | Choose All deployments or Specific deployments. |
| Deployments | Conditional | Conditional | Enter at least one deployment name when Specific deployments is selected. Hidden for All deployments. |
| Per day | Conditional | Yes | Daily budget amount in USD. Required if Per month is unset. An entered amount must be positive; an empty period is unlimited. |
| Per month | Conditional | Yes | Monthly budget amount in USD. Required if Per day is unset. An entered amount must be positive; an empty period is unlimited. |
| Cost object | No | Yes | The cost object the policy itself is bound to. For a project policy, it must match the folder name. Leave it empty when an assignment supplies the cost object. |

Subjects
Subject rules identify callers by their roles or token claims. Rules are combined with OR: a caller needs to match one rule.
An empty subject list does not make a policy apply to everyone: an assignment must supply the subject when the policy does not. Subject rules belong on the policy or its assignment, not both. The same rule editor is available in the Subjects step when creating a policy.
In the Subjects rule editor below, Required applies to each rule you add, not to the optional subject list. Editable describes platform-stored policies with write access and JSON Editor switched off:
| Field | Required | Editable | Description |
|---|---|---|---|
| Source | Yes | Yes | roles for the caller's DIAL roles, email for the resolved email, or a token claim path such as realm_access.roles. The source must be available for the rule to match. |
| Function | Yes | Yes | EQUAL matches a value and CONTAIN matches a substring, both ignoring case. REGEX matches the whole value against a pattern. TRUE and FALSE need no targets. |
| Targets | Conditional | Conditional | Values or patterns to match. Required and editable except for TRUE and FALSE. Selecting either of those functions clears and disables targets; enter targets again if you switch back to a function that uses them. |
With write access, use Add rule below the rules or the remove control at the end of an individual rule:
| Control | Description |
|---|---|
| Add rule | Adds a rule to the subject list. Complete its Source, Function, and any required Targets, then click Save. |
| Remove rule | Removes an individual rule from the staged subject list. Click Save to apply the removal. |
roles is the source for DIAL roles. A different source such as role is a token claim path and matches only if that claim exists. Use the claim names configured by your identity provider.
To add a rule for users with the DIAL role finance:
- Click Add rule.
- Set Source to
roles, select EQUAL for Function, and addfinanceto Targets. - Add further rules if needed. For example, a second rule with Source
roles, FunctionEQUAL, and Targetsadminalso matches users with theadminrole. - Click Save.

JSON editor
Switch JSON Editor on in the configuration header to review or edit the policy record as JSON instead of using Properties and Subjects. This view has no format selector. Its changes are staged until you click Save; Discard restores the saved record. For a read-only administrator, the JSON editor is read-only.
Delete
Delete a policy when its budget definition is no longer needed. Use the policy's actions menu or configuration screen for one policy, or select rows to delete several policies together.
Deletion requires write access. Core refuses to delete a policy while an assignment references it; remove or change the assignment first. Bulk deletion requires at least one selected row.
Changing or deleting budgets can affect model access in Enforce mode. Check that the affected callers still have a matching budget that can pay before deleting a policy.
To delete a policy:
- Open Delete in the policy's actions menu or configuration screen. For bulk deletion, select the policy rows and click Delete in the selection toolbar instead.
- Review the policy or policies in the confirmation, then click Delete to confirm or Cancel to keep them.
For deletion from the list, the confirmation displays the selected records for review before deletion.
Further reading
- Policy Assignments — grant reusable policies to subjects in a cost object
- Usage limits and cost control — compare role limits and budgets
- Global settings — spending modes and the default cost object