[Refactor] move tool parsing logic from protocol.py to the tool parser (#27383)

Co-authored-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Chauncey
2025-10-24 09:53:23 +00:00
committed by GitHub
co-authored by Aaron Pham
parent e0ef8a2920
commit 3567816932
9 changed files with 131 additions and 75 deletions
@@ -94,6 +94,7 @@ class MistralToolParser(ToolParser):
)
def adjust_request(self, request: ChatCompletionRequest) -> ChatCompletionRequest:
request = super().adjust_request(request)
if (
not isinstance(self.model_tokenizer, MistralTokenizer)
and request.tools