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
style: move anyio import to module level per Greptile review
Ryan Crabbe28c7cc6efebe
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex 8fa452fb40b..dd5af906f16 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -1,3 +1,4 @@+import anyioimport asyncioimport copyimport enum@@ -5147,8 +5148,6 @@ async def async_data_generator(# back to the connection pool. This prevents pool exhaustion when# clients disconnect mid-stream.# Shield from cancellation so the close awaits can complete.- import anyio-with anyio.CancelScope(shield=True):if hasattr(response, "aclose"):try: