[Bugfix] Allow --skip-tokenizer-init with echo and return_token_ids (#26238)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung 2025-10-05 13:38:53 +08:00 committed by GitHub
parent 78c1d5bfd2
commit a964e5e6c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -54,7 +54,7 @@ async def test_token_in_token_out_and_logprobs(server):
prompt=token_ids,
max_tokens=20,
temperature=0,
echo=False,
echo=True,
extra_body={
"return_token_ids": True,
},

View File

@ -691,5 +691,6 @@ class OpenAIServingCompletion(OpenAIServing):
truncate_prompt_tokens=request.truncate_prompt_tokens,
add_special_tokens=request.add_special_tokens,
cache_salt=request.cache_salt,
needs_detokenization=bool(request.echo),
needs_detokenization=bool(request.echo
and not request.return_token_ids),
)