mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
style(proxy): mark WindowSpendTransaction fields ReadOnly for the LIT012 gate
This commit is contained in:
parent
12aea29bad
commit
ea5a9f6ef0
1 changed files with 9 additions and 7 deletions
|
|
@ -13,6 +13,8 @@ from datetime import datetime, timezone
|
|||
from itertools import chain, groupby
|
||||
from typing import Final, TypedDict
|
||||
|
||||
from typing_extensions import ReadOnly
|
||||
|
||||
from litellm._logging import verbose_proxy_logger
|
||||
from litellm.constants import LITELLM_ASYNCIO_QUEUE_MAXSIZE
|
||||
from litellm.proxy.db.db_transaction_queue.base_update_queue import BaseUpdateQueue
|
||||
|
|
@ -37,13 +39,13 @@ class WindowSpendTransaction(TypedDict):
|
|||
seed drop the historical row that id already paid for.
|
||||
"""
|
||||
|
||||
entity_type: str
|
||||
entity_id: str
|
||||
window_duration: str
|
||||
window_start: str
|
||||
spend: float
|
||||
request_ids: Sequence[str]
|
||||
started_at: str | None
|
||||
entity_type: ReadOnly[str]
|
||||
entity_id: ReadOnly[str]
|
||||
window_duration: ReadOnly[str]
|
||||
window_start: ReadOnly[str]
|
||||
spend: ReadOnly[float]
|
||||
request_ids: ReadOnly[Sequence[str]]
|
||||
started_at: ReadOnly[str | None]
|
||||
|
||||
|
||||
def to_naive_utc(value: datetime) -> datetime:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue