mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
The cache TTL for a group's budget row was a new DEFAULT_MODEL_ACCESS_GROUP_CACHE_TTL env var defaulting to 600 seconds, which nobody asked for and which the docs gate rightly rejected as undocumented. Every other management object cached in auth_checks, tags included, already reads get_management_object_ttl, so it honors general_settings user_api_key_cache_ttl and falls back to the shared default. Group budgets now do the same, which drops a constant, drops an env var, and makes the row expire on the same operator knob as keys and teams. Also formats ModelAccessGroupBudgetRepository, and teaches the FakeBatch double in the unit of work tests about the new table. That double is read while the cascade unit of work is constructed rather than inside the block, so three tests that never mention access groups were failing at the async with. The new test alongside it walks the dataclass fields, so the next dependent added to the cascade is covered without anyone remembering to update a list. |
||
|---|---|---|
| .. | ||
| test_repositories.py | ||
| test_unit_of_work.py | ||