[Bugfix] Fix misleading context length error messages (#36197)
Signed-off-by: AjAnubolu <anuboluajay@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
86e1060b17
commit
43f10573c9
@@ -200,7 +200,7 @@ def test_chat_batch_failure_cleanup(llm_for_failure_test):
|
||||
batch_2 = [valid_msg, valid_msg]
|
||||
sampling_params = SamplingParams(temperature=0, max_tokens=10)
|
||||
|
||||
with pytest.raises(ValueError, match="context length is only"):
|
||||
with pytest.raises(ValueError, match="maximum context length is"):
|
||||
llm.chat(batch_1, sampling_params=sampling_params)
|
||||
assert llm.llm_engine.get_num_unfinished_requests() == 0
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ class TestRenderPrompt:
|
||||
|
||||
with pytest.raises(
|
||||
ValueError,
|
||||
match="input characters and requested .* context length is only",
|
||||
match="maximum context length is",
|
||||
):
|
||||
renderer.tokenize_prompts(
|
||||
prompts,
|
||||
@@ -292,7 +292,7 @@ class TestRenderPrompt:
|
||||
|
||||
with pytest.raises(
|
||||
ValueError,
|
||||
match="input tokens and requested .* context length is only",
|
||||
match="maximum context length is",
|
||||
):
|
||||
renderer.tokenize_prompts(
|
||||
prompts,
|
||||
@@ -313,7 +313,7 @@ class TestRenderPrompt:
|
||||
|
||||
with pytest.raises(
|
||||
ValueError,
|
||||
match="input tokens and requested .* context length is only",
|
||||
match="maximum context length is",
|
||||
):
|
||||
renderer.tokenize_prompts(
|
||||
prompts,
|
||||
|
||||
Reference in New Issue
Block a user