[Frontend][Core] Standardize request error handling with VLLMError hierarchy (#49665)

Signed-off-by: Zach Zhu <zzqshu@126.com>
This commit is contained in:
Zach Zhu
2026-07-29 04:20:40 +00:00
committed by GitHub
parent f37f03db4a
commit 58f9659397
46 changed files with 370 additions and 248 deletions
+4 -2
View File
@@ -7,6 +7,8 @@ from typing import TYPE_CHECKING, Literal, TypeAlias
from typing_extensions import NotRequired, TypedDict, assert_never
from vllm.exceptions import VLLMValidationError
if TYPE_CHECKING:
import torch
@@ -284,7 +286,7 @@ which can be passed to `LLMEngine.add_request` or `AsyncLLM.add_request`.
def _validate_enc_input(enc_input: SingletonInput) -> EncoderInput:
if enc_input["type"] == "embeds":
raise ValueError(
raise VLLMValidationError(
"Embedding inputs are not supported for encoder-decoder models"
)
@@ -302,7 +304,7 @@ def _validate_enc_input(enc_input: SingletonInput) -> EncoderInput:
def _validate_dec_input(dec_input: SingletonInput) -> DecoderEngineInput:
if dec_input["type"] == "embeds":
raise ValueError(
raise VLLMValidationError(
"Embedding inputs are not supported for encoder-decoder models"
)