Skip to content

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]

added ruff fixes

Jugal Bhatt3b35ab857f6f
diff --git a/.github/workflows/run_llm_translation_tests.py b/.github/workflows/run_llm_translation_tests.py
index 5b3a4817ecb..2e064498fbd 100755
--- a/.github/workflows/run_llm_translation_tests.py
+++ b/.github/workflows/run_llm_translation_tests.py
@@ -12,9 +12,6 @@ import subprocess
import xml.etree.ElementTree as ET
from collections import defaultdict
from datetime import datetime
-from pathlib import Path
-import json
-from typing import Dict, List, Tuple, Optional
# ANSI color codes for terminal output
class Colors:
diff --git a/cookbook/google_adk_litellm_tutorial.ipynb b/cookbook/google_adk_litellm_tutorial.ipynb
index 27914edbba8..448098d9c08 100644
--- a/cookbook/google_adk_litellm_tutorial.ipynb
+++ b/cookbook/google_adk_litellm_tutorial.ipynb
@@ -74,7 +74,6 @@
"source": [
"# Setup environment and API keys\n",
"import os\n",
- "import asyncio\n",
"from google.adk.agents import Agent\n",
"from google.adk.models.lite_llm import LiteLlm # For multi-model support\n",
"from google.adk.sessions import InMemorySessionService\n",
diff --git a/litellm/experimental_mcp_client/client.py b/litellm/experimental_mcp_client/client.py
index f2d32a5a9fb..e742cfcd18a 100644
--- a/litellm/experimental_mcp_client/client.py
+++ b/litellm/experimental_mcp_client/client.py
@@ -61,7 +61,7 @@ class MCPClient:
try:
await self.connect()
return self
- except Exception as e:
+ except Exception:
await self.disconnect()
raise
@@ -93,7 +93,7 @@ class MCPClient:
self._session_ctx = ClientSession(self._transport[0], self._transport[1])
self._session = await self._session_ctx.__aenter__()
await self._session.initialize()
- except Exception as e:
+ except Exception:
await self.disconnect()
raise
@@ -168,7 +168,7 @@ class MCPClient:
except asyncio.CancelledError:
await self.disconnect()
raise
- except Exception as e:
+ except Exception:
await self.disconnect()
raise
@@ -193,7 +193,7 @@ class MCPClient:
except asyncio.CancelledError:
await self.disconnect()
raise
- except Exception as e:
+ except Exception:
await self.disconnect()
raise
diff --git a/litellm/proxy/_experimental/mcp_server/rest_endpoints.py b/litellm/proxy/_experimental/mcp_server/rest_endpoints.py
index 07ff4712ed1..b2ee6f26da5 100644
--- a/litellm/proxy/_experimental/mcp_server/rest_endpoints.py
+++ b/litellm/proxy/_experimental/mcp_server/rest_endpoints.py
@@ -1,5 +1,5 @@
import importlib
-from typing import List, Optional
+from typing import Optional
from fastapi import APIRouter, Depends, Query, Request
diff --git a/test_script.py b/test_script.py
index d0fec5035b3..e4b4e2d0013 100644
--- a/test_script.py
+++ b/test_script.py
@@ -1,4 +1,3 @@
-import os
import json
mistral_model_cost_map = json.load(open("model_prices_and_context_window.json"))