Documentation/Quota and rate-limit chain

Quota and rate-limit chain

Amount, RPM and TPM are allocated through organization → team → person → key. A project adds a parallel ceiling, not another allocation pool.

Example

numeric limit -> fixed allocation
null          -> share remaining parent capacity
0             -> disabled

Contract

Increase limits parent-first; decrease child-first. Validate writes transactionally so a failed allocation cannot partially change roles or money. Resetting key spend restores its unused reservation; it does not erase historical personal/team/organization spend.

Routing inheritance is independent from quota inheritance. There is no request-budget reservation, so concurrent calls and long tasks can overshoot budgets.

Source and verification

internal/iam

bash scripts/regression.sh --verbose "TestRate|TestQuotaHierarchy|TestBudget|TestTeamless|TestPersonalKey"

Test prerequisites · Next: permissions

Search full documentation: budgets, routing, Docker…