Skip to content

[FEATURE]: Add GLM-4.7 tool calling and reasoning parser support to Rust frontend #5512

@tmonty12

Description

@tmonty12

Summary

Add support for GLM-4.7 model's tool calling and reasoning parsing in the Rust frontend component.

Background

GLM-4.7 (zai-org/GLM-4.7) requires specific parsers for tool calling and reasoning that are not currently implemented in Dynamo's Rust frontend. vLLM and SGLang support this model with --tool-call-parser glm47 and --reasoning-parser glm45.

Tool Call Parser (glm47)

Format (from tokenizer_config.json):

<tool_call>function_name
<arg_key>param1</arg_key>
<arg_value>value1</arg_value>
<arg_key>param2</arg_key>
<arg_value>value2</arg_value>
</tool_call>

Special tokens:

  • <tool_call> / </tool_call> - Tool call boundaries
  • <arg_key> / </arg_key> - Argument key wrapper
  • <arg_value> / </arg_value> - Argument value wrapper
  • <tool_response> / </tool_response> - Tool response wrapper (input side)

Reasoning Parser (glm45)

Format (from chat_template.jinja):

<|assistant|><think>reasoning content</think>actual response

Uses standard <think>...</think> tags for reasoning blocks.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfrontend`python -m dynamo.frontend` and `dynamo-run in=http|text|grpc`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions