allow requests with exactly context_len total tokens (#22546)

Co-authored-by: Ethan (Yusheng) Su <yushengsu.thu@gmail.com>
This commit is contained in:
Opher Lieber
2026-04-30 01:12:06 -07:00
committed by GitHub
co-authored by Ethan Su
parent 125f75db72
commit 99c0b62f1e
@@ -842,7 +842,7 @@ class TokenizerManager(TokenizerControlMixin, TokenizerManagerScoreMixin):
if (
self.validate_total_tokens
and max_new_tokens is not None
and (max_new_tokens + input_token_num) >= _max_req_len
and (max_new_tokens + input_token_num) > _max_req_len
):
if self.server_args.allow_auto_truncate:
logger.warning(