Skip to content

CAP-PFM-LLM-007Admit AI work against the organization’s monthly allowance

Markdown

CAP-PFM-LLM-007

Admit AI work against the organization’s monthly allowance

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleAI Requests, Usage and the Jazz AI TeammateRevision1

Read atservices-platform ad3f6a65

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Admission rejects requests whose reservation does not fit.A concurrency cap restricts simultaneous admitted requests.Dated grants affect capacity only while active.
Surfaces
apijob
Preconditions
Organization and operation switches permit admission.
Postconditions
Admission records either a reservation or its refusal figures.
Constraints
The meaning of an exhausted allowance needs a product decision when some credits remain but a reservation cannot fit.
Intent sources
services-platform:docs/proposals/llm-observability/11-decisions.md#D-3services-platform:docs/proposals/llm-observability/11-decisions.md#D-6services-platform:docs/milestones/PLAT-M1-ai-usage-metered-and-visible.md#D-3 (proposal)services-platform:docs/milestones/PLAT-M1-ai-usage-metered-and-visible.md#D-6 (proposal)

Controls

30 controls apply, from the corpus control catalogue.

TC-AVL-004 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-006 TC-CRY-001 TC-CRY-002 TC-CRY-003 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-001 TC-LOG-004 TC-LOG-005 TC-MON-001 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Business Rules

11 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
The organization receives one allowance period per local calendar month, created on demand with its configured allowance or the default 100,000 credits.
✓ An organization in Eastern time starts a new period at midnight on the first in its own zone.✗ Nothing has to run at month end for the allowance to start over.
calculationservice, databaseobserved
02must prove
Proposed
Admission atomically holds the estimate only if charged credits, existing holds and the new hold fit within active allowance capacity, capped at ten million credits; racing requests cannot over-reserve that capacity.
calculationservice, databaseobserved
03must prove
Proposed
An unaffordable request creates an allowance-refusal record with its needed and remaining credits, but sends nothing to the model and reserves and charges nothing.
policyserviceobserved
04must prove
Proposed
The concurrency default is eight requests unless organization limits specify another cap; an excess request gets a two-second retry hint, settlement or release returns its slot, and no daily cap applies.
policyservice, databasetest
services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#admits a ninth only once a call has settled, which gives its place back
05must prove
Proposed
When allowance and concurrency would both reject admission, the refusal reports the allowance.
policyservicetest
services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#says allowance_exceeded when both refuse, because that is the one that lasts
06must prove
Proposed
Capacity grants add together and apply from their start inclusive until their end exclusive or revocation, evaluated directly at request time without an activation or expiry job.
calculationservice, databaseobserved
07must prove
Proposed
Already admitted work is charged its measured usage even if the period exceeds its allowance.
calculationserviceobserved
08must prove
Proposed
Lower limits preserve running requests and their holds; later admission fails while charged and held credits exceed the reduced allowance, and settlement cannot drive holds below zero.
invariantservice, databaseobserved
09must prove
Proposed
Charged usage includes request settlements and signed corrections, while available credits subtract both charged usage and outstanding holds from the allowance.
calculationservice, databaseobserved
10must prove
Proposed
A refusal retains its decision-time allowance, committed and needed credits, active capacity, limits version, concurrency and switches once, without prompt or person content.
invariantservice, databaseobserved
11
Proposed
The allowance covers the organization as a whole and has no departmental or cost-centre allocations.
policyservicedocumented
services-platform:docs/llm.md#What is deliberately not here

Scenarios

IdGivenWhenThenProvenance
01Concurrent requests compete for capacity sufficient for fifteen reservations.Twenty requests attempt admission.Fifteen reservations succeed and five are refused for allowance capacity.test
services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#refuses the other five as the allowance being spent, not as the cap
02The remaining credit balance is smaller than the next request’s maximum reservation.A person submits that request.Admission refuses it despite a positive remaining balance.documented
services-platform:docs/milestones/plans/PLAT-M1-plan.md#D1. When is an organization's allowance "used up"?

Edge Cases

IdGivenWhenThenProvenance
03A temporary grant reaches its end time.A new request attempts admission.The expired grant contributes no capacity.test
services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#refuses it as the allowance being spent, with no override left in force

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.