vllm.exceptions ¶
Custom exceptions for vLLM.
Classes:
-
GenerationError–raised when finish_reason indicates internal server error (500)
-
GracefulHTTPError–Exception that should be translated into an HTTP error response.
-
LoRAAdapterNotFoundError–Exception raised when a LoRA adapter is not found.
-
MaxQueuedTokensError–Raised when the pending prefill tokens exceed the configured limit.
-
QueueOverflowError–Raised when admitting a request would exceed the request queue limit.
-
VLLMClientError–Base class for errors caused by the client request (4xx).
-
VLLMError–Base class for all vLLM-specific errors.
-
VLLMNotFoundError–vLLM-specific NotFoundError
-
VLLMServerError–Base class for errors caused by the server (5xx).
-
VLLMUnprocessableEntityError–vLLM-specific error for unprocessable entity requests.
-
VLLMValidationError–vLLM-specific validation error for request validation failures.
GenerationError ¶
Bases: VLLMServerError
raised when finish_reason indicates internal server error (500)
Source code in vllm/exceptions.py
GracefulHTTPError ¶
Bases: VLLMError
Exception that should be translated into an HTTP error response.
These are expected to occur during normal operation (e.g. admission control rejections) and should be surfaced to the client with the explicit HTTP status code they carry, rather than being mapped to a generic 4xx/5xx by the client/server split.
Source code in vllm/exceptions.py
LoRAAdapterNotFoundError ¶
Bases: VLLMNotFoundError
Exception raised when a LoRA adapter is not found.
This exception is thrown when a requested LoRA adapter does not exist in the system.
Attributes:
-
message(str) –The error message string describing the exception
Source code in vllm/exceptions.py
MaxQueuedTokensError ¶
Bases: GracefulHTTPError
Raised when the pending prefill tokens exceed the configured limit.
Returns HTTP 503 (Service Unavailable) so that load balancers and client SDKs retry the request on a different instance.
Source code in vllm/exceptions.py
QueueOverflowError ¶
Bases: GracefulHTTPError
Raised when admitting a request would exceed the request queue limit.
Returns HTTP 503 (Service Unavailable) so that load balancers and client SDKs retry the request on a different instance.
Source code in vllm/exceptions.py
VLLMClientError ¶
VLLMError ¶
Bases: Exception
Base class for all vLLM-specific errors.
Subclasses are split into VLLMClientError (caused by the request, mapped to 4xx) and VLLMServerError (caused by the server, mapped to 5xx). Dispatching on this hierarchy lets the entrypoints decide the HTTP status without relying on raw Python exception types such as ValueError.
Source code in vllm/exceptions.py
VLLMNotFoundError ¶
Bases: VLLMClientError
vLLM-specific NotFoundError
VLLMServerError ¶
VLLMUnprocessableEntityError ¶
Bases: VLLMClientError
vLLM-specific error for unprocessable entity requests.
This exception is raised when the request content is invalid or cannot be processed, such as when an image URL points to a non-existent or inaccessible resource (404, 403, DNS failure, etc.).
Parameters:
-
(message¶str) –The error message describing the unprocessable entity.
-
(parameter¶str | None, default:None) –Optional parameter name that failed validation.
-
(value¶Any, default:None) –Optional value that was rejected during validation.
Source code in vllm/exceptions.py
VLLMValidationError ¶
Bases: VLLMClientError
vLLM-specific validation error for request validation failures.
Parameters:
-
(message¶str) –The error message describing the validation failure.
-
(parameter¶str | None, default:None) –Optional parameter name that failed validation.
-
(value¶Any, default:None) –Optional value that was rejected during validation.