[ROCm][CI] Restore Mistral tool-parser compatibility after unification (#50515)

Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
This commit is contained in:
Andreas Karatzas
2026-07-31 16:32:43 +00:00
committed by GitHub
parent 7c08664f5c
commit 8d8a4e0f2b
2 changed files with 21 additions and 4 deletions
+10
View File
@@ -25,6 +25,16 @@ class MistralToolParser(MistralParserToolAdapter): # type: ignore[valid-type, m
# correctly instead of crashing or dumping the raw envelope into arguments.
supports_required_and_named = False
@property
def bot_token(self) -> str:
"""Return the Mistral tool-call marker exposed by the legacy parser."""
return self._parser_engine.bot_token
@property
def bot_token_id(self) -> int | None:
"""Return the token id for :attr:`bot_token`."""
return self._parser_engine.bot_token_id
def adjust_request(
self,
request: ChatCompletionRequest | ResponsesRequest,