fix(proxy): add execute_raw to the PrismaBatch protocol

Prerequisite for the #50298 backport to lts/1.108.x, which queues guarded raw spend resets on the batch.
Hand-ported from 24a7bf6af7 (#48260, main).
This commit is contained in:
mateo-berri 2026-11-10 17:35:54 -08:00
parent b3f1386fa7
commit 5065e9d16e
2 changed files with 5 additions and 0 deletions

View file

@ -171,4 +171,6 @@ class PrismaBatch(Protocol):
@property
def litellm_projecttable(self) -> BatchTable: ...
def execute_raw(self, query: str, *args: object) -> None: ...
async def commit(self) -> None: ...

View file

@ -39,6 +39,9 @@ class FakeBatch:
self.litellm_projecttable = FakeBatchTable("litellm_projecttable", self.calls)
self.litellm_endusertable = FakeBatchTable("litellm_endusertable", self.calls)
def execute_raw(self, query: str, *args: object) -> None:
self.calls.append(("execute_raw", {"query": query}, {"args": args}))
async def commit(self) -> None:
self.commit_count += 1