mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
fix: session grouping for dict rows from query_raw
This commit is contained in:
parent
f329294005
commit
f14e14d546
1 changed files with 5 additions and 1 deletions
|
|
@ -3278,7 +3278,11 @@ async def _build_ui_spend_logs_response(
|
|||
count_map: dict[str, int] = {}
|
||||
if enrich_session_counts:
|
||||
session_ids = list(
|
||||
{row.session_id for row in data if getattr(row, "session_id", None)}
|
||||
{
|
||||
(row.get("session_id") if isinstance(row, dict) else getattr(row, "session_id", None))
|
||||
for row in data
|
||||
if (row.get("session_id") if isinstance(row, dict) else getattr(row, "session_id", None))
|
||||
}
|
||||
)
|
||||
if session_ids:
|
||||
# NOTE: This GROUP BY runs on every v1/UI page load. The IN clause
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue