mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
Merge commit 'b329372da03ea859f7e09117b40cf4e260762ede' into litellm_alerts_reconcile_03
# Conflicts: # tests/unit/repositories/test_analytics_budget.py
This commit is contained in:
commit
bb8ac22a51
2 changed files with 3 additions and 3 deletions
|
|
@ -73,7 +73,7 @@ Replace `issue-example` with an ID returned by `/issues`. Activity uses the issu
|
|||
|
||||
Alert Activity returns exact daily totals in `results` and exact range totals in `metadata`. It does not return the general Usage API's per-day dimension dictionaries. Key issues also return `model_breakdown`, with up to 20 models by range spend by default. Set `model_limit` between 1 and 100 to change that limit. `total_models` counts every matching model; `other` contains the combined metrics and `model_count` of all remaining models, or null when none remain. It is an aggregate, not a model identifier. Adding the displayed models and `other` recovers the full totals. Model identifiers longer than 1,024 characters are included in `other` without truncation. Non-key issues return null for `model_breakdown`. Activity queries use a bounded execution budget. A busy or over-budget query returns `503` with `Retry-After: 5`; retry later or choose a shorter date range.
|
||||
|
||||
`/impact` reports distinct resource counts and requests within that same Activity range. These counts mean that resources used the cohort, not that each resource suffered a regression. Saved `impact.measured_keys` and `impact.measured_models`, when present, describe cohorts that met the detector's comparison criteria. Resource pages fetch labels only for the selected page, using the latest deleted-key label when needed. They do not load arbitrary key or user metadata. Display aliases are limited to 256 characters; email labels longer than 320 characters are omitted. Resource IDs remain unchanged. Historical team aggregates do not retain user membership, so a team issue has no `/users` view and its user count is null. User issues similarly have no historical team count. Missing attribution remains unknown.
|
||||
`/impact` reports distinct resource counts and requests within that same Activity range. These counts mean that resources used the cohort, not that each resource suffered a regression. Saved `impact.measured_keys` and `impact.measured_models`, when present, describe cohorts that met the detector's comparison criteria. Resource pages fetch labels only for the selected page, using the latest deleted-key label when needed. They do not load arbitrary key or user metadata. Display aliases are limited to 256 characters; email labels longer than 320 characters are omitted. Resource pages omit IDs longer than 1,024 characters or 4,096 bytes instead of truncating them. Key IDs that need a `raw:` escape prefix reserve four characters within that limit. Oversized linked user or team IDs are omitted from resource metadata. Activity totals still include traffic from omitted resources. Historical team aggregates do not retain user membership, so a team issue has no `/users` view and its user count is null. User issues similarly have no historical team count. Missing attribution remains unknown.
|
||||
|
||||
Supporting signals have their own saved comparisons and relationship explanations. Their baseline windows can differ, so do not derive a combined error rate or unit cost by adding their displayed values. Administrators and admin viewers can inspect broader supporting signals. A scoped reader receives only signals for the exact key, user, or team they can access. That restriction applies before the signal count and pagination; broader totals are not disclosed.
|
||||
|
||||
|
|
|
|||
|
|
@ -945,7 +945,7 @@ async def test_issue_resource_metadata_bounds_labels_and_deleted_history(
|
|||
"""INSERT INTO "LiteLLM_DailyUserSpend"
|
||||
(id,user_id,date,api_key,model,custom_llm_provider,api_requests,successful_requests,updated_at)
|
||||
VALUES($1,$2,$3,$4,'example-model',$1,10,10,CURRENT_TIMESTAMP),
|
||||
($1||'-wide',repeat(chr(128640),65536),$3,repeat(chr(128640),65536),
|
||||
($1||'-wide',repeat(chr(128640),8192),$3,repeat(chr(128640),8192),
|
||||
'example-model',$1,20,20,CURRENT_TIMESTAMP)""",
|
||||
identity,
|
||||
owner,
|
||||
|
|
@ -976,7 +976,7 @@ async def test_issue_resource_metadata_bounds_labels_and_deleted_history(
|
|||
await _query(
|
||||
db,
|
||||
"""UPDATE "LiteLLM_DeletedVerificationToken"
|
||||
SET user_id=repeat(chr(128640),65536),team_id=repeat(chr(128640),65536)
|
||||
SET user_id=repeat(chr(128640),8192),team_id=repeat(chr(128640),8192)
|
||||
WHERE id=$1||'-400'""",
|
||||
identity,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue