Update code-comment example (green-r -> glm-5.3-flash)

This commit is contained in:
inference-bot committed 2026-10-02 22:04:54 -06:00
1 parent 29823e87d5
commit 1fe0e47802
1 file changed
+3 -3
+3 -3
View File
@@ -252,7 +252,7 @@ def aggregate_model_usage(days: int = 0, team_id: str | None = None) -> dict:
`team_id` restricts to one member's team (used by the dashboard path).
Prefers the `model_group` column, which carries our provider/model alias
(e.g. greenpt/green-r); falls back to `model` for pre-alias rows — matching
(e.g. greenpt/glm-5.3-flash); falls back to `model` for pre-alias rows — matching
the logic the HTTP path used, expressed in SQL.
"""
if not litellm_db_ready():
@@ -2172,7 +2172,7 @@ async def admin_model_usage(request: Request, days: int = 0):
rows = rows.get("data", rows.get("logs", []))
for row in rows if isinstance(rows, list) else []:
# Prefer model_group: it carries our provider/model alias (e.g.
# greenpt/green-r, publicai/apertus-v1.5-8b) when present; the
# greenpt/glm-5.3-flash, publicai/apertus-v1.5-8b) when present; the
# raw `model` field holds messy upstream/internal names. Older
# rows predating the alias convention have model_group empty,
# so fall back to `model` for those.
@@ -2397,7 +2397,7 @@ async def broker_get_usage(email: str, days: int = 0) -> dict:
if row.get("team_id") != team_id:
continue
# Prefer model_group: it carries our provider/model alias (e.g.
# greenpt/green-r) when present; the raw `model` field holds
# greenpt/glm-5.3-flash) when present; the raw `model` field holds
# messy upstream/internal names. Older rows predating the alias
# convention have model_group empty, so fall back to `model`.
model = row.get("model_group") or row.get("model") or "unknown"