Repository navigation
feat: per-model and per-class toleration presets in account files - #2081
Merged
Merged
Conversation
The interactive/throughput presets, per-account class grants and account or overlay default classes are unused. Removing them now keeps the routing path small before model class routing lands. - Onwards resolves only overlay targets (`custom`) or nothing (`standard`) and the self-hosted restriction; class suffixes are no longer parsed. - dwctl no longer strips or interprets realtime class suffixes. Flex, background and batch uploads still discard a model suffix after a shape check, unchanged. - The admin API drops the grant and default-class fields; the organisation serving view and model overlays keep targets and self_hosted_only. - The model catalog accepts `serving_classes` only as an empty map. The organisation catalog prices `standard` and `custom` only, and retires any rows it owned under the old class names. - The dashboard drops the grant, default-class and preset views. Stored onwards configuration that still carries the old fields loads with them ignored. Database columns are left in place for a later migration.
Assert that a PATCH carrying the retired grant and default-class fields is accepted, writes neither column and returns neither field. Restrict the organisation pricing view to the classes billing can select (standard, and custom when an overlay's targets apply), so a manual price under a retired class name is no longer shown as if it applied.
Each account file can now hold one account's whole serving deal, per model and per serving class, alongside its realtime in-flight limits: - an account-wide scheduling priority, with model and class overrides; - ttft/itl latency targets per class; - batch prices per model, realtime/playground prices and a cache tariff per class. The older top-level `realtime_inflight` shape is still accepted and means `classes.standard.realtime_inflight`. Only `standard` can be configured until models carry other classes. The account files are reconciled in one transaction: limits keep their whole-table semantics; priorities, policies and prices are owned per row by the `account-catalog` source, so hand-written rows are adopted only when the pair is declared and rows owned by the organisation catalog are refused. An account/model pair may be configured in an account file or an organisation overlay, not both. Onwards stamps the resolved priority and targets on realtime requests to dynamo members as hints that keep the request billed as its own class; legacy overlay targets keep their custom-class behaviour and daemon traffic keeps its deadline priority. The migration is additive (a nullable users column and a new table); older images ignore both, and today's files reconcile to exactly what they do now.
Reject the background tier's reserved priority and latency targets that do not fit the stored integer, and refuse to overwrite a policy row another writer owns (unowned rows are adopted, as manual prices are). Clarify that latency targets apply to realtime requests only and when account-file failures stop startup.
An account file can now set `toleration_preset` on a model or on one of its classes. For requests to that model the preset replaces the account's own (console-set) preset; the more specific setting wins: class, then model, then the account, then none. "No preset" stays distinct from the empty list. The per-key policy map carries each account's per-model presets, so the inference middleware resolves the list after the model is known (realtime, flex and background) and batch upload stamps each line by its model. An id the deployment does not configure fails closed to the empty list, as account presets already do, and startup logs any such id the files name. Dormant until an account file sets the field.
…on-presets # Conflicts: # docs/src/reference/model-provisioning.md # dwctl/src/account_limits.rs # dwctl/src/lib.rs
Deploying control-layer with
|
| Latest commit: |
c5338a0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6ca26b88.control-layer.pages.dev |
| Branch Preview URL: | https://feat-account-toleration-pres.control-layer.pages.dev |
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
rushilbhat
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Account files can set a scheduling-toleration preset on a model, or on one class of it:
For requests to that model, the preset replaces the account's own preset (
users.toleration_preset, set by a platform manager). The more specific setting wins: class, then model, then the account, then none. "No preset" stays distinct from an empty toleration list. Onlystandardcan be configured until models carry other classes, as with the rest of the account file.The account-wide preset stays owned by the admin console; the files only add model and class overrides.
How
account_model_policies.toleration_preset. Written by the account-file reconcile like the other policy columns; the table's existing notify trigger refreshes caches.KeyPolicycarries its account's per-model preset map (class folded over model), shared byArcacross the account's keys. One extra small query per refresh.scheduling.toleration_presetsdoesn't define (the offline validator has no access to config).Rollout
Dormant: nothing changes until an account file sets
toleration_preset. Older images ignore the new column.Tests
just lint rust: green.just test rust: 4241 passed.🤖 Generated with Claude Code