mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
A model access group could gate which models a caller reaches but never how
much that group of callers could spend in total. Capping a shared pool meant
setting a per-entity budget on every key by hand, which caps each key
separately and still leaves no way to read what the group cost.
Spend is attributed to a group only when the group's name appears on an
allowlist the caller was granted (key, team, team-member scope, project or
org) and that group serves the requested model. Asking for a model that
merely belongs to a group attributes nothing, because nothing about the
caller named the group. Levels are unioned rather than ranked, so a team
granted "*" whose member is scoped to one group still counts as gated by
that group.
Enforcement runs on both paths tags already use: a reservation counter on
the pre-call path and a read-time max_budget check inside the existing
concurrent budget gather, so the ceiling still holds under
disable_budget_reservation.
Adds LiteLLM_ModelAccessGroupBudgetTable, which is the only place a group is
ever a row: the groups themselves stay free-text strings in
model_info.access_groups, so a row exists only once someone gives that group
a budget. GET, PUT and DELETE /access_group/{name}/budget manage it, and
/access_group/{name}/info now carries the spend and budget alongside the
models.
146 lines
2.4 KiB
JSON
146 lines
2.4 KiB
JSON
{
|
|
"reportAny": {
|
|
"limit": 17270
|
|
},
|
|
"reportArgumentType": {
|
|
"limit": 2538
|
|
},
|
|
"reportAssignmentType": {
|
|
"limit": 319
|
|
},
|
|
"reportAttributeAccessIssue": {
|
|
"limit": 480
|
|
},
|
|
"reportCallIssue": {
|
|
"limit": 112
|
|
},
|
|
"reportConstantRedefinition": {
|
|
"limit": 40
|
|
},
|
|
"reportDeprecated": {
|
|
"limit": 212
|
|
},
|
|
"reportDuplicateImport": {
|
|
"limit": 19
|
|
},
|
|
"reportExplicitAny": {
|
|
"limit": 5486
|
|
},
|
|
"reportFunctionMemberAccess": {
|
|
"limit": 7
|
|
},
|
|
"reportGeneralTypeIssues": {
|
|
"limit": 101
|
|
},
|
|
"reportIncompatibleMethodOverride": {
|
|
"limit": 56
|
|
},
|
|
"reportIncompatibleVariableOverride": {
|
|
"limit": 8
|
|
},
|
|
"reportInconsistentOverload": {
|
|
"limit": 12
|
|
},
|
|
"reportIndexIssue": {
|
|
"limit": 35
|
|
},
|
|
"reportInvalidTypeForm": {
|
|
"limit": 34
|
|
},
|
|
"reportInvalidTypeVarUse": {
|
|
"limit": 2
|
|
},
|
|
"reportMatchNotExhaustive": {
|
|
"limit": 0
|
|
},
|
|
"reportMissingParameterType": {
|
|
"limit": 5658
|
|
},
|
|
"reportMissingTypeArgument": {
|
|
"limit": 15425
|
|
},
|
|
"reportMissingTypeStubs": {
|
|
"limit": 40
|
|
},
|
|
"reportOperatorIssue": {
|
|
"limit": 0
|
|
},
|
|
"reportOptionalCall": {
|
|
"limit": 0
|
|
},
|
|
"reportOptionalIterable": {
|
|
"limit": 0
|
|
},
|
|
"reportOptionalMemberAccess": {
|
|
"limit": 1055
|
|
},
|
|
"reportOptionalOperand": {
|
|
"limit": 0
|
|
},
|
|
"reportOptionalSubscript": {
|
|
"limit": 0
|
|
},
|
|
"reportPossiblyUnboundVariable": {
|
|
"limit": 56
|
|
},
|
|
"reportPrivateUsage": {
|
|
"limit": 1808
|
|
},
|
|
"reportRedeclaration": {
|
|
"limit": 8
|
|
},
|
|
"reportReturnType": {
|
|
"limit": 213
|
|
},
|
|
"reportTypedDictNotRequiredAccess": {
|
|
"limit": 25
|
|
},
|
|
"reportUndefinedVariable": {
|
|
"limit": 0
|
|
},
|
|
"reportUnknownArgumentType": {
|
|
"limit": 44526
|
|
},
|
|
"reportUnknownLambdaType": {
|
|
"limit": 109
|
|
},
|
|
"reportUnknownMemberType": {
|
|
"limit": 38721
|
|
},
|
|
"reportUnknownParameterType": {
|
|
"limit": 19778
|
|
},
|
|
"reportUnknownVariableType": {
|
|
"limit": 30290
|
|
},
|
|
"reportUnnecessaryCast": {
|
|
"limit": 117
|
|
},
|
|
"reportUnnecessaryComparison": {
|
|
"limit": 697
|
|
},
|
|
"reportUnnecessaryContains": {
|
|
"limit": 5
|
|
},
|
|
"reportUnnecessaryIsInstance": {
|
|
"limit": 829
|
|
},
|
|
"reportUntypedBaseClass": {
|
|
"limit": 0
|
|
},
|
|
"reportUntypedFunctionDecorator": {
|
|
"limit": 27
|
|
},
|
|
"reportUnusedClass": {
|
|
"limit": 21
|
|
},
|
|
"reportUnusedFunction": {
|
|
"limit": 138
|
|
},
|
|
"reportUnusedImport": {
|
|
"limit": 543
|
|
},
|
|
"reportUnusedVariable": {
|
|
"limit": 139
|
|
}
|
|
}
|