litellm/enterprise
mateo-berri 9dabd72f2d refactor(repositories): type prisma table access with one generic protocol
Every repository handed its `.table` back untyped, so a dozen modules had
each grown a private `_PrismaTableActions` Protocol to paper over it. They
had drifted: some declared `update` as returning the row, others the row or
None, and none agreed on whether `find_many` was covariant

Replace all of them with a single `TableActions[RowT_co]` in
`litellm/repositories/prisma_protocols.py`, keyed to the prisma row each
repository is bound to. Query inputs stay `Mapping[str, object]` so callers
keep passing plain dicts, and `find_many` returns `Sequence` so the row type
stays covariant

Typing the nullable returns honestly surfaced paths that were already
crashing. A team admin could never edit or delete a memory entry owned by
their team: the write-auth check fed a raw prisma row to a helper that
expects the domain model, so `members_with_roles` arrived as plain dicts and
the request died as a 500 instead of applying the edit. Non-admin members hit
the same 500 in place of the 403 they were owed, so refusal and breakage were
indistinguishable. `/v2/model/info?user_models_only=true` dereferenced a
missing user row rather than returning the 400 the route already had, three
team routes dereferenced a team deleted between the read and the write, and
the agent registry dereferenced a missing agent instead of naming it

basedpyright drops 2,132 errors, 1,454 of them reportAny and 73
reportExplicitAny. The dashboard's generated types pick up `string[]` where
they had `unknown[]` for a team's members, admins and models
2026-08-25 12:14:17 +00:00
..
cloudformation_stack (fix) litellm cloud formation stack 2024-03-07 18:06:59 -08:00
dist BUMP Enterprise PIP 2026-02-14 13:40:48 -08:00
enterprise_hooks fix(proxy): scan batch records with the content hooks that are not guardrails (#37786) 2026-08-21 11:20:23 -07:00
enterprise_ui Update README.md 2024-02-21 22:11:39 -08:00
litellm_enterprise refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
__init__.py (fix) error cli users see when importing enterprise folder 2024-03-15 08:10:45 -07:00
LICENSE.md docs: document new github + gitlab ci scripts 2026-03-25 20:17:10 -07:00
pyproject.toml bump: litellm-enterprise 0.1.58 -> 0.1.59, litellm-proxy-extras 0.4.88 -> 0.4.89 (#37939) 2026-08-22 09:12:47 -07:00
README.md Fix enterprise doc link (#31815) 2026-07-09 11:48:11 -07:00

LiteLLM Enterprise

Code in this folder is licensed under a commercial license. Please review the LICENSE file within the /enterprise folder

These features are covered under the LiteLLM Enterprise contract

👉 Using in an Enterprise / Need specific features ? Meet with us here

See all Enterprise Features here 👉 Docs