ROCm / ROCm/FastFlowLM

Bug: Tool calls with Object arguments are serialized as string

Open
#537 22 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.9k
Forks
152
Avg merge
4h 14m
Merged PRs (30d)
11

Description

When using FastFlowLM with OpenCode and Gemma 4 E4B model, I observed frequent tool call failures, by inspecting the log I observed the likely cause to be wrong data serialization

        {
            "content": "",
            "role": "assistant",
            "tool_calls": [
                {
                    "function": {
                        "arguments": "{\"filePath\":\"./src/main/java/my/path/to/JavaClass.java\"}",
                        "name": "read"
                    },
                    "id": "call_1777830235_96",
                    "type": "function"
                },
                {
                    "function": {
                        "arguments": "{\"filePath\":\"./src/main/java/my/path/to/OtherClass.java\"}",
                        "name": "read"
                    },
                    "id": "call_1777830239_97",
                    "type": "function"
                }
            ]
        },

This results in error:

Invalid input for tool read: JSON parsing failed: Text: {{\\\"filePath\\\":\\\"./src/main/java/my/path/to/JavaClass.java\\\\"}}.
Error message: JSON Parse error: Expected '}'

Probably related to https://github.com/FastFlowLM/FastFlowLM/issues/483

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reviewing issue 483 and reproducing the failure with FastFlowLM, OpenCode, and the Gemma 4 E4B model, then trace tool-call argument serialization. Done means object arguments remain valid JSON for the tool parser and the reported read calls succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.