mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
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:
parent
b3f1386fa7
commit
5065e9d16e
2 changed files with 5 additions and 0 deletions
|
|
@ -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: ...
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue