feat(frontend): early-fail tokenization guard for user requests (#31366)

Signed-off-by: limingliang <limingliang@stepfun.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Co-authored-by: limingliang <limingliang@stepfun.com>
Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Mingliang Li
2026-02-05 19:38:02 -08:00
committed by GitHub
co-authored by limingliang DarkLight1337
parent 20d7454c9b
commit a32cb49b60
7 changed files with 315 additions and 209 deletions
+4
View File
@@ -57,6 +57,10 @@ class TokenizerLike(Protocol):
def max_token_id(self) -> int:
raise NotImplementedError
@property
def max_chars_per_token(self) -> int:
raise NotImplementedError
@property
def truncation_side(self) -> str:
raise NotImplementedError