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]

Fix vllm import (#7224)

Ivan Vykopal553453daa956
diff --git a/litellm/llms/vllm/completion/handler.py b/litellm/llms/vllm/completion/handler.py
index b2371ffca3c..f8f1e54a1fa 100644
--- a/litellm/llms/vllm/completion/handler.py
+++ b/litellm/llms/vllm/completion/handler.py
@@ -29,8 +29,7 @@ class VLLMError(Exception):
def validate_environment(model: str):
global llm
try:
- from litellm.llms.vllm.completion.handler import LLM # type: ignore
- from litellm.llms.vllm.completion.handler import SamplingParams # type: ignore
+ from vllm import LLM, SamplingParams # type: ignore
if llm is None:
llm = LLM(model=model)