litellm/tests/test_litellm/proxy/utils
Yucheng Zhu 6586e455c3 fix(observability): correct job duration pairing, lock error reporting and the item count
Three defects surfaced in review.

Durations were keyed by job id alone, but APSCHEDULER_MAX_INSTANCES and
coalesce are both env-overridable, so several runs of one job can be in flight
or one submission can carry several run times. Runs are now keyed by job id and
scheduled run time, so concurrent runs stop consuming each other's start times.

A failed lock attempt was reported as ordinary contention, because the inner
method returns False both when another pod wins and when Redis errors. The
wrapper now owns the no-Redis and error exits and emits a distinct result, with
the bool | None contract to callers unchanged.

update_spend no longer reports an item count. The spend-log queue is drained by
_monitor_spend_logs_queue as well, so a count derived from queue depth here
could credit that task's work or hide work this job did. The listener still
publishes counts for any job that can report one it owns.
2026-08-19 18:58:37 -07:00
..
helpers fix(proxy): resolve entity access groups in the model listing endpoints (#36230) 2026-08-07 17:45:30 -07:00
prisma_and_spend fix(observability): correct job duration pairing, lock error reporting and the item count 2026-08-19 18:58:37 -07:00
proxy_logging Merge pull request #26900 from BerriAI/litellm_model-deprecation-alerts-55bc 2026-08-17 18:15:20 -07:00
__init__.py test(proxy/utils): pin bottom-of-file helper behavior (#29509) 2026-06-02 17:45:19 -07:00