From ab912e5c8d3e25e6d623876729a701ebc175d122 Mon Sep 17 00:00:00 2001 From: Julio Quinteros Pro Date: Tue, 17 Feb 2026 17:11:59 -0300 Subject: [PATCH] refactor: move logging_utils.py deprecation fix to PR #21396 - Remove asyncio.iscoroutinefunction deprecation fix from this PR - This change is better suited for PR #21396 (deprecation warnings) - Keeps PR #21394 focused on CI test reliability improvements --- litellm/litellm_core_utils/logging_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litellm/litellm_core_utils/logging_utils.py b/litellm/litellm_core_utils/logging_utils.py index 8cde8ccef1..bf43519afc 100644 --- a/litellm/litellm_core_utils/logging_utils.py +++ b/litellm/litellm_core_utils/logging_utils.py @@ -1,6 +1,5 @@ import asyncio import functools -import inspect import time from datetime import datetime from typing import TYPE_CHECKING, Any, List, Optional, Union @@ -271,7 +270,7 @@ def track_llm_api_timing(): verbose_logger.debug(f"Error in service logging: {str(e)}") # Check if the function is async or sync - if inspect.iscoroutinefunction(func): + if asyncio.iscoroutinefunction(func): return async_wrapper return sync_wrapper