[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:
Ajay Anubolu
2026-03-05 22:15:12 -08:00
committed by GitHub
parent 86e1060b17
commit 43f10573c9
4 changed files with 35 additions and 23 deletions

View File

@@ -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