[Frontend] Parse tool calls and reasoning from checkpoint response templates (#58604)
Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Bugen Zhao <i@bugenzhao.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Yoni Gozlan <yonigozlan@users.noreply.github.com> Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
co-authored by
Cursor
Bugen Zhao
Claude Opus 5.5
parent
5a661487e2
commit
9bd993564f
@@ -165,6 +165,7 @@ class OpenAIServingChat(GenerateBaseServing):
|
||||
tool_strict_level=tool_strict_level,
|
||||
model_name=self.model_config.model,
|
||||
is_harmony=self.model_config.hf_config.model_type == "gpt_oss",
|
||||
tokenizer=self.renderer.tokenizer,
|
||||
)
|
||||
self.exclude_tools_when_tool_choice_none = exclude_tools_when_tool_choice_none
|
||||
|
||||
@@ -974,6 +975,8 @@ class OpenAIServingChat(GenerateBaseServing):
|
||||
parser = self._make_parser(
|
||||
request, tokenizer, self._effective_chat_template_kwargs(request)
|
||||
)
|
||||
if parser is not None and final_res.prompt_token_ids is not None:
|
||||
parser.set_prompt_token_ids(final_res.prompt_token_ids)
|
||||
token_ids = output.token_ids
|
||||
out_logprobs = output.logprobs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user