The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction
Julio Quinteros Pro6678b2bd1db7
diff --git a/litellm/litellm_core_utils/logging_utils.py b/litellm/litellm_core_utils/logging_utils.pyindex bf43519afc6..8cde8ccef1c 100644--- a/litellm/litellm_core_utils/logging_utils.py+++ b/litellm/litellm_core_utils/logging_utils.py@@ -1,5 +1,6 @@import asyncioimport functools+import inspectimport timefrom datetime import datetimefrom typing import TYPE_CHECKING, Any, List, Optional, Union@@ -270,7 +271,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 asyncio.iscoroutinefunction(func):+ if inspect.iscoroutinefunction(func):return async_wrapperreturn sync_wrapper