mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
* fix(proxy): derive config agent ids from agent_name so grants survive secret rotation Config-defined A2A agents were identified by a sha256 of the whole resolved config entry, secrets included, so rotating an os.environ secret re-minted the agent_id on restart and orphaned every object_permission.agents grant while grant-less keys kept access (LIT-5144). The id now hashes only agent_name, and the old full-entry hash is kept as a legacy alias: permission checks, GET /v1/agents filtering, spend and key attachment, and public_agent_groups all normalize legacy ids so pre-upgrade grants keep working * fix(proxy): persist stable agent ids into stored grants at startup The runtime alias only translates a legacy grant while the current config still hashes to it, so a secret rotation after upgrading would orphan the grant, and an orphaned grant intersecting a stable team grant collapses to an empty list that downstream reads as allow-all. Rewriting the stored ids once at boot removes both. This cannot be a SQL migration because only the running proxy can recompute the legacy hash from resolved config secrets * fix(proxy): make the grant id migration a compare-and-swap A grant edited between the migration's read and write kept the stale snapshot. The update now predicates on the agents array read at scan time via update_many, so a concurrently modified row is skipped and the runtime alias covers it until the next boot retries * fix(proxy): retry the grant id migration and stay within the LIT002 ceiling The one-shot startup task now retries up to three times with a short delay so a transient DB error at boot cannot leave a legacy grant unmigrated until an operator's next restart is the rotation itself. The new list constructions in the migration and the alias-expanded agent id lookups are tuples now, keeping the branch under the mutable-collection budget * fix(proxy): count compare-and-swap misses in the grant id migration migrate_legacy_grant_ids now returns rewritten and missed counts from the update_many results instead of reporting scanned rows as migrated, and the startup task retries while any rows remain unmigrated, not just on errors * fix(lint): clear basedpyright budget breaches in agent id aliasing
368 lines
4.1 KiB
JSON
368 lines
4.1 KiB
JSON
{
|
|
"ANN001": {
|
|
"limit": 3121
|
|
},
|
|
"ANN002": {
|
|
"limit": 71
|
|
},
|
|
"ANN003": {
|
|
"limit": 834
|
|
},
|
|
"ANN201": {
|
|
"limit": 2033
|
|
},
|
|
"ANN202": {
|
|
"limit": 865
|
|
},
|
|
"ANN204": {
|
|
"limit": 713
|
|
},
|
|
"ANN205": {
|
|
"limit": 114
|
|
},
|
|
"ANN206": {
|
|
"limit": 133
|
|
},
|
|
"ANN401": {
|
|
"limit": 1630
|
|
},
|
|
"ASYNC230": {
|
|
"limit": 11
|
|
},
|
|
"B004": {
|
|
"limit": 2
|
|
},
|
|
"B006": {
|
|
"limit": 178
|
|
},
|
|
"B008": {
|
|
"limit": 505
|
|
},
|
|
"B009": {
|
|
"limit": 81
|
|
},
|
|
"B010": {
|
|
"limit": 190
|
|
},
|
|
"B018": {
|
|
"limit": 2
|
|
},
|
|
"B019": {
|
|
"limit": 1
|
|
},
|
|
"B021": {
|
|
"limit": 1
|
|
},
|
|
"B026": {
|
|
"limit": 3
|
|
},
|
|
"B033": {
|
|
"limit": 0
|
|
},
|
|
"BLE001": {
|
|
"limit": 2926
|
|
},
|
|
"C401": {
|
|
"limit": 8
|
|
},
|
|
"C404": {
|
|
"limit": 1
|
|
},
|
|
"C405": {
|
|
"limit": 19
|
|
},
|
|
"C408": {
|
|
"limit": 11
|
|
},
|
|
"C414": {
|
|
"limit": 4
|
|
},
|
|
"C419": {
|
|
"limit": 1
|
|
},
|
|
"C901": {
|
|
"limit": 315
|
|
},
|
|
"D419": {
|
|
"limit": 6
|
|
},
|
|
"DTZ001": {
|
|
"limit": 2
|
|
},
|
|
"DTZ003": {
|
|
"limit": 26
|
|
},
|
|
"DTZ005": {
|
|
"limit": 233
|
|
},
|
|
"DTZ006": {
|
|
"limit": 10
|
|
},
|
|
"DTZ007": {
|
|
"limit": 19
|
|
},
|
|
"DTZ011": {
|
|
"limit": 3
|
|
},
|
|
"EXE001": {
|
|
"limit": 4
|
|
},
|
|
"EXE002": {
|
|
"limit": 3
|
|
},
|
|
"F401": {
|
|
"limit": 17
|
|
},
|
|
"FURB136": {
|
|
"limit": 0
|
|
},
|
|
"FURB168": {
|
|
"limit": 0
|
|
},
|
|
"FURB188": {
|
|
"limit": 0
|
|
},
|
|
"I001": {
|
|
"limit": 0
|
|
},
|
|
"LOG015": {
|
|
"limit": 5
|
|
},
|
|
"N999": {
|
|
"limit": 1
|
|
},
|
|
"PERF102": {
|
|
"limit": 27
|
|
},
|
|
"PERF401": {
|
|
"limit": 13
|
|
},
|
|
"PERF402": {
|
|
"limit": 0
|
|
},
|
|
"PERF403": {
|
|
"limit": 34
|
|
},
|
|
"PIE790": {
|
|
"limit": 0
|
|
},
|
|
"PIE800": {
|
|
"limit": 0
|
|
},
|
|
"PIE804": {
|
|
"limit": 18
|
|
},
|
|
"PIE810": {
|
|
"limit": 43
|
|
},
|
|
"PLC0206": {
|
|
"limit": 26
|
|
},
|
|
"PLC0208": {
|
|
"limit": 0
|
|
},
|
|
"PLC0414": {
|
|
"limit": 46
|
|
},
|
|
"PLR0124": {
|
|
"limit": 1
|
|
},
|
|
"PLR0206": {
|
|
"limit": 1
|
|
},
|
|
"PLR0402": {
|
|
"limit": 0
|
|
},
|
|
"PLR1704": {
|
|
"limit": 3
|
|
},
|
|
"PLR1711": {
|
|
"limit": 0
|
|
},
|
|
"PLR1714": {
|
|
"limit": 257
|
|
},
|
|
"PLR1730": {
|
|
"limit": 0
|
|
},
|
|
"PLR2044": {
|
|
"limit": 0
|
|
},
|
|
"PLW0127": {
|
|
"limit": 57
|
|
},
|
|
"PLW0133": {
|
|
"limit": 1
|
|
},
|
|
"PLW0602": {
|
|
"limit": 215
|
|
},
|
|
"PLW0603": {
|
|
"limit": 191
|
|
},
|
|
"PLW1508": {
|
|
"limit": 190
|
|
},
|
|
"PLW1510": {
|
|
"limit": 2
|
|
},
|
|
"PYI030": {
|
|
"limit": 0
|
|
},
|
|
"PYI036": {
|
|
"limit": 3
|
|
},
|
|
"PYI041": {
|
|
"limit": 0
|
|
},
|
|
"PYI064": {
|
|
"limit": 0
|
|
},
|
|
"RET501": {
|
|
"limit": 0
|
|
},
|
|
"RET504": {
|
|
"limit": 177
|
|
},
|
|
"RUF010": {
|
|
"limit": 0
|
|
},
|
|
"RUF012": {
|
|
"limit": 241
|
|
},
|
|
"RUF015": {
|
|
"limit": 8
|
|
},
|
|
"RUF019": {
|
|
"limit": 38
|
|
},
|
|
"RUF022": {
|
|
"limit": 0
|
|
},
|
|
"RUF023": {
|
|
"limit": 0
|
|
},
|
|
"RUF046": {
|
|
"limit": 4
|
|
},
|
|
"RUF051": {
|
|
"limit": 0
|
|
},
|
|
"RUF059": {
|
|
"limit": 67
|
|
},
|
|
"RUF100": {
|
|
"limit": 100
|
|
},
|
|
"S110": {
|
|
"limit": 218
|
|
},
|
|
"S112": {
|
|
"limit": 22
|
|
},
|
|
"SIM101": {
|
|
"limit": 58
|
|
},
|
|
"SIM102": {
|
|
"limit": 322
|
|
},
|
|
"SIM103": {
|
|
"limit": 119
|
|
},
|
|
"SIM113": {
|
|
"limit": 3
|
|
},
|
|
"SIM114": {
|
|
"limit": 0
|
|
},
|
|
"SIM115": {
|
|
"limit": 2
|
|
},
|
|
"SIM117": {
|
|
"limit": 7
|
|
},
|
|
"SIM118": {
|
|
"limit": 0
|
|
},
|
|
"SIM201": {
|
|
"limit": 1
|
|
},
|
|
"SIM210": {
|
|
"limit": 8
|
|
},
|
|
"SIM211": {
|
|
"limit": 1
|
|
},
|
|
"SIM222": {
|
|
"limit": 1
|
|
},
|
|
"SIM401": {
|
|
"limit": 11
|
|
},
|
|
"TC004": {
|
|
"limit": 5
|
|
},
|
|
"TC005": {
|
|
"limit": 0
|
|
},
|
|
"TID251": {
|
|
"limit": 1240
|
|
},
|
|
"TRY002": {
|
|
"limit": 528
|
|
},
|
|
"TRY004": {
|
|
"limit": 96
|
|
},
|
|
"TRY201": {
|
|
"limit": 407
|
|
},
|
|
"TRY203": {
|
|
"limit": 113
|
|
},
|
|
"TRY300": {
|
|
"limit": 860
|
|
},
|
|
"UP006": {
|
|
"limit": 0
|
|
},
|
|
"UP007": {
|
|
"limit": 0
|
|
},
|
|
"UP008": {
|
|
"limit": 0
|
|
},
|
|
"UP012": {
|
|
"limit": 0
|
|
},
|
|
"UP018": {
|
|
"limit": 0
|
|
},
|
|
"UP024": {
|
|
"limit": 0
|
|
},
|
|
"UP028": {
|
|
"limit": 2
|
|
},
|
|
"UP031": {
|
|
"limit": 2
|
|
},
|
|
"UP032": {
|
|
"limit": 0
|
|
},
|
|
"UP034": {
|
|
"limit": 0
|
|
},
|
|
"UP035": {
|
|
"limit": 0
|
|
},
|
|
"UP036": {
|
|
"limit": 1
|
|
},
|
|
"UP037": {
|
|
"limit": 0
|
|
},
|
|
"UP045": {
|
|
"limit": 0
|
|
}
|
|
}
|