Skip to content

Qwen3.5 tool-call parser is stricter than SGLang qwen3_coder on boolean args #47

@rohitrastogi

Description

@rohitrastogi

SGLang uses the qwen3_coder tool-call parser for Qwen 3.5: https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.5

In SGLang, Qwen3CoderDetector._convert_param_value does lightweight schema-aware coercion for parameter values. In particular, for bool arguments it lowercases the raw value before interpreting it: https://github.com/sgl-project/sglang/blob/c67b2870569a1a639459389b0355641074ea9a74/python/sglang/srt/function_call/qwen3_coder_detector.py#L144

Renderers’ Qwen 3.5 parser is stricter. If the model generates True / False for boolean parameters, Renderers marks the tool call as ToolCallParseStatus.INVALID_JSON, because json.loads("True") / json.loads("False") fails: https://github.com/PrimeIntellect-ai/renderers/blob/main/renderers/parsing.py#L89

For example, with a tool schema like:

 {
   "type": "object",
   "properties": {
     "path": {"type": "string"},
     "max_depth": {"type": "integer"},
     "include_files": {"type": "boolean"},
     "show_size": {"type": "boolean"}
   }
 }

and model output like:

<function=filesystem_server_get_directory_tree>
<parameter=path>/</parameter>
<parameter=max_depth>2</parameter>
<parameter=include_files>True</parameter>
<parameter=show_size>True</parameter>
</function>

SGLang's Qwen3CoderDetector finds a valid tool call, but Renderers reports INVALID_JSON.

From Renderers' perspective, what's the source of truth for the tool parsing behavior? Should Renderers have integration tests against the known SGLang/vLLM tool call parsers, or should downstream framework integrators handle these semantic differences themselves?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions