fix(copilot): add max_tokens_exceeded to prompt-too-long patterns

The pattern was missing from _PROMPT_TOO_LONG_PATTERNS, causing
test_max_tokens_exceeded and test_all_patterns to fail. Also sync
test_all_patterns with the full pattern list (add input tokens exceed).
This commit is contained in:
Zamil Majdy
2026-03-14 23:43:07 +07:00
parent 045096d863
commit ca0b3cde16
2 changed files with 2 additions and 0 deletions

View File

@@ -103,6 +103,7 @@ _PROMPT_TOO_LONG_PATTERNS: tuple[str, ...] = (
"request too large",
"maximum context length",
"context_length_exceeded",
"max_tokens_exceeded",
"input tokens exceed",
"input is too long",
"content length exceeds",

View File

@@ -89,6 +89,7 @@ class TestIsPromptTooLong:
"maximum context length",
"context_length_exceeded",
"max_tokens_exceeded",
"input tokens exceed",
"input is too long",
"content length exceeds",
]