[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
co-authored by Claude Opus 4.6
parent 86e1060b17
commit 43f10573c9
4 changed files with 35 additions and 23 deletions
+3 -3
View File
@@ -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,