Repository navigation
feat: account files carry priority, latency targets and prices - #2075
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.
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.
Deploying control-layer with
|
| Latest commit: |
0b0e3fc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://abafc3ad.control-layer.pages.dev |
| Branch Preview URL: | https://feat-account-policy-files.control-layer.pages.dev |
|
Running ultrareview automatically — this PR appears to change a database schema or migrate data, where a missed bug can corrupt or lose records, so a deeper multi-pass review is worth running. I'll post findings when complete. |
There was a problem hiding this comment.
Ultrareview ran automatically — this PR appears to change a database schema or migrate data, where a missed bug can corrupt or lose records, so a deeper multi-pass review is worth running.
All reported issues were addressed across 16 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
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.
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Requires human review: Large feature extending account files with per-model priority, latency targets and prices: new DB table and column, gateway sync changes, and scheduling hints stamped on realtime requests. This is a cross-cutting production-request-path change requiring human review.
View guided diff | Turn on auto-fix | Re-trigger cubic
What
Account files (
model_provisioning.account_limits_directory) can now hold one account's whole serving deal, per model and per serving class:realtime_inflightshape is still accepted and meansclasses.standard.realtime_inflight. If both name the same model, the two limits must match.standardcan be configured until models carry other classes.validate-account-limits --org-overlays.dwctl-model-provisioning account-schemacommand.How
users.scheduling_priority, plus a newaccount_model_policiestable (account, model, optional class: priority, ttft_ms, itl_ms). Both have notify triggers. Older images ignore both.account-catalogprovisioning source:nvext.agent_hints.priority/nvext.router.{ttft,itl}_targeton realtime requests todynamomembers.targets, which still make itcustom.Design choices worth a look
Rollout
Dormant. Today's files reconcile to exactly what they do now, because they only use the old limits shape. Nothing changes until a file uses the new fields.
Tests
just lint rust: green.just test rust: 4236 passed.🤖 Generated with Claude Code