diff --git a/llama_stack/models/llama/llama4/chat_format.py b/llama_stack/models/llama/llama4/chat_format.py index d84409ae1..e673cba16 100644 --- a/llama_stack/models/llama/llama4/chat_format.py +++ b/llama_stack/models/llama/llama4/chat_format.py @@ -203,14 +203,8 @@ class ChatFormat: tokens.extend(toks) images.extend(imgs) - if message.role == "assistant" and len(message.tool_calls) > 0: - tokens.append(self.tokenizer.special_tokens["<|python_start|>"]) - _process_content(message.content) - if message.role == "assistant" and len(message.tool_calls) > 0: - tokens.append(self.tokenizer.special_tokens["<|python_end|>"]) - if message.role == "user" and message.context is not None: # This is RAG context; why is it here in the chat format? I don't think # this is needed and can be moved upwards