Addressing linting issues

This commit is contained in:
yuneng-jiang 2025-11-13 15:49:35 -08:00
parent d62dfd4be2
commit 09afe14a5f
3 changed files with 26 additions and 6 deletions

View file

@ -2600,6 +2600,7 @@ class SpendLogsPayload(TypedDict):
cache_key: str
request_tags: str # json str
team_id: Optional[str]
organization_id: Optional[str]
end_user: Optional[str]
requester_ip_address: Optional[str]
custom_llm_provider: Optional[str]

View file

@ -972,6 +972,20 @@ class DBSpendUpdateWriter:
) -> None:
...
@overload
@staticmethod
async def _update_daily_spend(
n_retry_times: int,
prisma_client: PrismaClient,
proxy_logging_obj: ProxyLogging,
daily_spend_transactions: Dict[str, DailyOrganizationSpendTransaction],
entity_type: Literal["org"],
entity_id_field: str,
table_name: str,
unique_constraint_name: str,
) -> None:
...
@overload
@staticmethod
async def _update_daily_spend(
@ -1430,9 +1444,16 @@ class DBSpendUpdateWriter:
)
return
# Inject org_id for daily aggregation check
payload_with_org: SpendLogsPayload = dict(payload)
payload_with_org["organization_id"] = org_id
print("org_id", org_id)
print("payload", payload)
payload_with_org = cast(
SpendLogsPayload,
{
**payload,
"organization_id": org_id,
},
)
base_daily_transaction = (
await self._common_add_spend_log_transaction_to_daily_transaction(

View file

@ -281,10 +281,8 @@ async def get_organization_daily_activity(
"""
from litellm.proxy.proxy_server import (
prisma_client,
proxy_logging_obj,
user_api_key_cache,
)
if prisma_client is None:
raise HTTPException(
status_code=500,