[Frontend][Core] Standardize request error handling with VLLMError hierarchy (#49665)
Signed-off-by: Zach Zhu <zzqshu@126.com>
This commit is contained in:
+3
-2
@@ -15,6 +15,7 @@ from vllm.envs import (
|
||||
env_with_choices,
|
||||
environment_variables,
|
||||
)
|
||||
from vllm.exceptions import VLLMValidationError
|
||||
|
||||
|
||||
def test_getattr_without_cache(monkeypatch: pytest.MonkeyPatch):
|
||||
@@ -547,7 +548,7 @@ class TestVllmMaxNSequences:
|
||||
max_n = envs.VLLM_MAX_N_SEQUENCES
|
||||
SamplingParams(n=max_n)
|
||||
|
||||
with pytest.raises(ValueError, match="n must be at most"):
|
||||
with pytest.raises(VLLMValidationError, match="n must be at most"):
|
||||
SamplingParams(n=max_n + 1)
|
||||
|
||||
def test_sampling_params_respects_custom_limit(
|
||||
@@ -563,5 +564,5 @@ class TestVllmMaxNSequences:
|
||||
|
||||
SamplingParams(n=128)
|
||||
|
||||
with pytest.raises(ValueError, match="n must be at most 128"):
|
||||
with pytest.raises(VLLMValidationError, match="n must be at most 128"):
|
||||
SamplingParams(n=129)
|
||||
|
||||
Reference in New Issue
Block a user