Skip to main content

Tag Management page

A tag is a label a request carries, set on a key, a team or the request itself. On this page you define tags, tag the deployments that should serve a request with that tag, and give a tag its own budget, so that tag routing and tag spend limits work. Tags that requests passed in on the fly also show here, so you can see them. The page lives at /ui/tag-management and sits under ACCESS CONTROL in the left nav as Tag Management. The nav item shows only for the session role Admin, which covers both proxy_admin and the view-only proxy_admin_viewer. The page has no license gate.

What this page is for​

A tag is a short label a request carries. When you create a tag with a list of allowed models, each of those deployments gets the tag on its Tags field, and with tag filtering on the router sends requests with that tag to them. Give the tag a budget and requests with that tag stop when the budget is spent. This page is where an admin defines tags, sees the ones requests already use, and keeps model restrictions and budgets in one place instead of on every key.

A real-world scenario​

A SaaS company wants paying customers on a provider account with a higher rate limit. The admin creates the tag paid on this page with the premium deployment under Tag these deployments and a monthly Max Budget (USD), turns on tag filtering under Router Settings, and adds paid to the paying customers' keys. Their requests land on the premium account, the budget caps what the tier can spend, and the Usage page reports spend per tag.

Step by step​

  1. Open /ui/tag-management as a proxy admin and click + Create New Tag.
  2. Type paid as the Tag Name, add a Description, pick the premium deployment under Tag these deployments, open Budget & Rate Limits (Optional), set Max Budget (USD) to 200 and Reset Budget to monthly, and click Create Tag. The toast reads Tag created successfully.
  3. Open /ui/router-settings, turn on Enable Tag Filtering on the Loadbalancing tab and click Save Changes.
  4. Open /ui/api-keys and add paid under Tags on the paying customers' keys.
  5. Click the tag name on this page to open its detail view and confirm Tagged deployments and Budget & Rate Limits.

The same tag over the API:

curl -X POST http://localhost:4000/tag/new \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
-d '{"name": "paid", "description": "Paying customers", "models": ["3f9c0e2a-paid"], "max_budget": 200.0, "budget_duration": "30d"}'

curl http://localhost:4000/tag/list -H "Authorization: Bearer $SPANWAY_MASTER_KEY"

Expected result​

The create answers {"message": "Tag paid created successfully", "tag": {"name": "paid", "description": "Paying customers", "models": ["3f9c0e2a-paid"], "model_info": {"3f9c0e2a-paid": "claude-sonnet-5-5"}, ...}}, the premium deployment now carries the tag paid (a deployment defined in config.yaml is skipped and needs the tag in config.yaml), and GET /tag/list lists the tag with its budget. Requests from keys tagged paid are served by the premium deployment, and once the tag has spent 200 dollars in the month they are refused until the budget resets.

Tag list​

The heading reads Tag Management. Next to it a refresh button reloads the list and then shows "Last Refreshed" with the time. A line says "Click on a tag name to view and edit its details.", and a note explains that tags can restrict which models serve a request, with a link to the tag routing guide. + Create New Tag opens the create dialog.

ControlTypeWhat it does
Filter by tag nameText boxPlaceholder "Filter by tag name…". Filters the loaded list in the browser.
Filter by descriptionText boxPlaceholder "Filter by description…". Filters the loaded list in the browser.

The table sorts and pages in the browser, newest first by default.

ColumnMeaning
Tag NameThe tag. Click it to open the tag detail view. Sortable.
DescriptionThe description, or "-".
Tagged deploymentsThe deployments recorded on the tag, shown by name with the model ID on hover, or "None listed". The list is a record of the deployments tagged on create and never limits which models a tagged request may use.
CreatedThe creation date. Sortable.
ActionsA row menu with Edit and Delete.

A tag that a request passed in without it being defined here is a dynamic spend tag. Its description reads "This is just a spend tag that was passed dynamically in a request. It does not control any LLM models." Its name is grey and cannot be opened ("You cannot view the information of a dynamically generated spend tag"), and Edit and Delete are disabled for it.

Edit opens the tag detail view with the edit form open. Delete opens Delete Tag with the tag name and the warning "Are you sure you want to delete this tag? This action cannot be undone." Confirming deletes the tag and shows "Tag deleted successfully". The tag's budget stops applying and the definition cannot be restored. Deployments keep the tag on their Tags field, so remove it there when requests with the tag should no longer reach them.

Create New Tag dialog​

FieldTypeWhat it does
Tag NameText boxRequired ("Please input a tag name"). The gateway refuses a name that already exists.
DescriptionText areaOptional.
Tag these deploymentsMulti-selectPlaceholder "Select deployments". What it does: adds this tag to the Tags of each deployment you pick when you click Create Tag, so tag routing sends requests that carry the tag to them. How it helps: you can keep one customer tier or team on its own provider account without editing each deployment by hand. Empty, the default, creates the tag without adding it to any deployment. Each option is a model deployment, shown by model name with its ID, and a deployment from config.yaml is skipped, so tag it in config.yaml. It never stops a tagged request from using other models, so use key, team or access group model lists for that. Proxy admins set it.
Budget & Rate Limits (Optional)Collapsible sectionClosed by default. Holds the two fields below.
Max Budget (USD)NumberThe most this tag may spend. When it is reached, requests with this tag are blocked.
Reset BudgetDropdownn/a, hourly, daily, weekly or monthly.

The budget fields are sent only while the section is open. A note in the section says that requests per minute and tokens per minute limits for a tag are enforced but are set with the API, by sending rpm_limit and tpm_limit to /tag/new or /tag/update.

Create Tag sends the form and resets it straight away. On success "Tag created successfully" shows and the dialog closes. If the create fails, the error shows as a toast and the dialog stays open, but the fields are already cleared, so you have to type them again.

Tag detail view​

The Back to Tags button returns to the list. The header shows Tag Name with the tag and a copy button, and the description or "No description". Edit Tag shows for the session role Admin.

CardWhat it shows
Tag DetailsName, Description, Tagged deployments ("None listed" when empty, model ID on hover), Created and Last Updated.
Budget & Rate LimitsShown when the tag has a budget. Max Budget, Budget Duration, TPM Limit and RPM Limit, each only when set.

Edit tag form​

FieldTypeWhat it does
Tag NameRead-only textThe name cannot be changed. The note under it says a tag keeps its name because keys, teams and request logs refer to it by name, so create a new tag to use a different name.
DescriptionText areaThe description.
Tagged deployments (list only)Multi-selectPlaceholder "Select Models". The options here are the model names you can call, while the create dialog lists model deployments by ID. Saving changes the tag's list only and does not add or remove the tag on deployments, so edit a deployment's Tags on the Models page to change where requests go. Check the selection before you save.
Budget & Rate LimitsCollapsible sectionClosed by default. Holds the two fields below, plus the note that tag rate limits are set with the API.
Max Budget (USD)NumberMust be 0 or more ("Enter a nonnegative budget"). Clear the field to remove the budget.
Reset BudgetDropdownn/a, hourly, daily, weekly or monthly.

The budget fields are filled with the current values only when you opened the form from the row menu's Edit. When you opened it with Edit Tag on the detail view they start empty. In both cases they are sent only while the section is open, so leave it closed to keep the current budget.

Save Changes shows "Tag updated successfully", closes the form and reloads the tag. Cancel closes the form without saving.

Empty, error and disabled states​

SituationWhat you seeWhat to do
No tags"No tags yet" and "Create a tag to start routing and restricting model usage."Create a tag.
Filters match nothing"No matching tags" and "Try a different tag name or description."Change the filters.
Loading"Loading tags…", or "Loading..." on the detail viewWait. The detail view stays on "Loading..." if the tag cannot be read, so go back and refresh the list.
A request failsA toast such as "Error fetching tags", "Error creating tag", "Error updating tag" or "Error deleting tag" with the reasonRead the reason and try again.
Dynamic spend tagGrey name, disabled Edit and DeleteNothing to do. These tags only record spend.

Errors​

What you seeWhyFix
Error creating tag with Tag paid already existsThe name is taken.Edit the existing tag, or pick another name.
Please input a tag nameThe Tag Name field is empty.Type a name.
Enter a nonnegative budgetMax Budget (USD) is below zero.Enter zero or more.
Error updating tag with Tag paid not foundThe tag was deleted meanwhile.Refresh the list.
Error deleting tag with user not allowed to access this route, role= proxy_admin_viewer. Trying to access: /tag/deleteAdmin viewers can only read tags.Sign in as a proxy admin.
You cannot view the information of a dynamically generated spend tagThe tag was only ever passed in requests and has no definition.Create a tag with the same name to give it models and a budget.
Requests with the tag are refused with a budget errorThe tag's budget is spent.Raise Max Budget (USD), or wait for the Reset Budget period.
The tag has no effect on routingTag filtering is off, or no deployment carries the tag.Turn on Enable Tag Filtering and check the deployment's Tags.

Audit​

Creating, editing and deleting a tag each write a row to the audit log on Spanway_TagTable with who made the change and the values before and after, budget included. Tagging a deployment during create writes an updated row on Spanway_ProxyModelTable with its tags before and after.

Logs​

The gateway logs Error creating tag: <reason>, Error updating tag: <reason> and Error adding tag to deployment: <reason> at ERROR when a save fails, and Tag <name> not added to deployment <id>: it is defined in config.yaml, set its tags there at INFO when a chosen deployment lives in config.yaml. The tag routing logs list every line.

Differences by role and license​

Role or settingEffect on this page
Proxy admin (session role Admin)Sees the page and every control.
View-only admin (proxy_admin_viewer)Gets session role Admin Viewer and sees the page under the view-only banner. Edit Tag on the tag details is hidden, but the create button and the row menu have no role check, so they still show. The gateway refuses the changes for this role.
Every other roleDoes not see the page in the nav. The list and row menu have no role check of their own, so the gateway decides what a user who opens the URL can do.
LicenseNo license is needed for this page.