Files
nixpkgs/pkgs/development/python-modules/litellm/model-cost-map-retry-wait-for-import.patch
Anish Pallati 751977afa8 python3Packages.litellm: 1.102.1 -> 1.106.2
Signed-off-by: Anish Pallati <i@anish.land>
2026-10-22 14:01:47 -04:00

19 lines
805 B
Diff

--- a/litellm/litellm_core_utils/get_model_cost_map.py
+++ b/litellm/litellm_core_utils/get_model_cost_map.py
@@ -577,6 +577,7 @@
first_outcome: _FetchAttemptRetryable,
) -> None:
try:
+ _litellm_import_complete.wait()
first_wait: Final = _next_retry_wait(outcome=first_outcome, attempt=1, max_attempts=max_attempts, rng=rng)
if isinstance(first_wait, ModelCostMapReloadUnavailable):
return
@@ -596,7 +597,6 @@
max_attempts,
)
return
- _litellm_import_complete.wait()
if not GetModelCostMap.validate_model_cost_map(
fetched_map=result.model_cost_map,
backup_model_count=GetModelCostMap._get_backup_model_count(), # pyright: ignore[reportPrivateUsage] # integrity cache