fix(nemotron3): forward tools to parse_qwen35 for schema-aware coercion (#65)
This commit is contained in:
@@ -430,7 +430,7 @@ class Nemotron3Renderer:
|
||||
self,
|
||||
token_ids: list[int],
|
||||
*,
|
||||
tools: list[ToolSpec] | None = None, # noqa: ARG002 — args land in a JSON object, schema not needed
|
||||
tools: list[ToolSpec] | None = None,
|
||||
) -> ParsedResponse:
|
||||
stop_ids = {self._im_end}
|
||||
if self._endoftext is not None:
|
||||
@@ -443,6 +443,7 @@ class Nemotron3Renderer:
|
||||
think_end_id=self._think_end,
|
||||
tool_call_id=self._tool_call,
|
||||
tool_call_end_id=self._tool_call_end,
|
||||
tools=tools,
|
||||
)
|
||||
|
||||
def get_stop_token_ids(self) -> list[int]:
|
||||
|
||||
@@ -26,7 +26,7 @@ import pytest
|
||||
|
||||
|
||||
# (HuggingFace model name, renderer name). Two JSON-shaped controls
|
||||
# (string types already preserved by the wire format) + four XML-style
|
||||
# (string types already preserved by the wire format) + five XML-style
|
||||
# parsers that rely on the schema to preserve them.
|
||||
_MODELS = [
|
||||
("Qwen/Qwen3-8B", "auto"), # hermes JSON — control
|
||||
@@ -35,6 +35,7 @@ _MODELS = [
|
||||
("zai-org/GLM-5", "auto"), # XML
|
||||
("MiniMaxAI/MiniMax-M2.5", "auto"), # XML
|
||||
("poolside/Laguna-XS.2", "auto"), # XML
|
||||
("nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16", "auto"), # XML
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user