Skip to content

[Bug]: Hermes tool call parser: pops empty list #20991

@RobertFischer

Description

@RobertFischer

Your current environment

4xH100-80GiB

CLI Args:

        # Inference
        - --model
        - Qwen/Qwen3-235B-A22B-FP8
        - --gpu-memory-utilization
        - "0.90"
        - --disable-custom-all-reduce

        - --rope-scaling.rope_type
        - "yarn"
        - --rope-scaling.factor
        - 4
        - --rope-scaling.original_max_position_embeddings
        - 32768
        - --max-model-len
        - "131072"
        - --tensor-parallel-size
        - "4"

        # Function calling
        - --enable-auto-tool-choice
        - --tool-call-parser
        - hermes

        # Server
        - --host
        - "0.0.0.0"
        - --disable-log-requests

🐛 Describe the bug

Pops from an empty list in the Hermes tool call parser.

IndexError: pop from empty list
  File "/usr/local/lib/python3.12/dist-packages/partial_json_parser/core/myelin.py", line 50, in fix_fast
    _i, _char = stack.pop()

  File "/usr/local/lib/python3.12/dist-packages/partial_json_parser/core/api.py", line 22, in ensure_json
    head, tail = fix_fast(json_string, allow_partial)

  File "/usr/local/lib/python3.12/dist-packages/partial_json_parser/core/api.py", line 15, in parse_json
    return parser(ensure_json(json_string, allow_partial, use_fast_fix))

  File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py", line 241, in extract_tool_calls
    current_tool_call = partial_json_parser.loads(...)

Unfortunately, I don't have the client request for you.

Image

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions