[Bugfix][Rust Frontend] Validate out-of-vocab token ids in request params (#44680)

Signed-off-by: Ting Sun <suntcrick@gmail.com>
Co-authored-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
Ting SUN
2026-06-11 03:14:11 -07:00
committed by GitHub
co-authored by Bugen Zhao
parent 9492362972
commit 1f9dd7900d
16 changed files with 258 additions and 2 deletions
+10
View File
@@ -140,6 +140,16 @@ impl ChatLlm {
self
}
/// Tokenizer vocabulary size.
pub fn tokenizer_vocab_size(&self) -> usize {
self.text.tokenizer_vocab_size()
}
/// Model vocabulary size, else `None`.
pub fn model_vocab_size(&self) -> Option<usize> {
self.text.model_vocab_size()
}
/// Expose the underlying text facade for raw text-generation routes such as
/// `/v1/completions`.
pub fn text(&self) -> &TextLlm {