ollama - ✅(Solved) Fix Qwen3.5-35b with OpenClaw sometimes throws an error. [1 pull requests, 3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15250Fetched 2026-04-08 02:33:39
View on GitHub
Comments
3
Participants
3
Timeline
12
Reactions
1
Author
Assignees
Timeline (top)
commented ×3cross-referenced ×2referenced ×2assigned ×1

Error Message

If I use qwen3.5:35b-a3b-q8_0 with OpenClaw, sometimes I get this error:

PR fix notes

PR #15406: responses: add support for fn call output arrays

Description (problem / solution / changelog)

In addition to strings (which we already supported), OpenResponses supports arrays of text content, image content, or file content (see https://www.openresponses.org/reference#object-FunctionCallOutput-title). We were missing support for these arrays, which caused unmarshal errors like

json: cannot unmarshal array into Go struct field ResponsesFunctionCallOutput.output of type string

This change adds support for text content and image content, as those are more straightforwardly mappable to Ollama message formats (though image and text interleaving is lost), but it's less clear what to do for files. In the future we can partially support this by inlining reasonably sized text files, but wanted to get this change out first.

Fixes: #15250

Changed files

  • openai/responses.go (modified, +140/-37)
  • openai/responses_test.go (modified, +106/-0)

Code Example

400 input[135]: json: cannot unmarshal array into Go struct field ResponsesFunctionCallOutput.output of type string
RAW_BUFFERClick to expand / collapse

What is the issue?

If I use qwen3.5:35b-a3b-q8_0 with OpenClaw, sometimes I get this error:

Relevant log output

400 input[135]: json: cannot unmarshal array into Go struct field ResponsesFunctionCallOutput.output of type string

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.20.0

extent analysis

TL;DR

  • The error is likely due to a type mismatch between the expected string output and the actual array output in the ResponsesFunctionCallOutput struct, and can be fixed by updating the struct to match the actual output type.

Guidance

  • Verify that the ResponsesFunctionCallOutput struct in the Go code is defined with an output field of type string, which is causing the type mismatch error.
  • Check the API documentation or the OpenClaw library to see if the output field is expected to be an array or a string, and update the struct accordingly.
  • If the output field is indeed supposed to be an array, update the Go struct to use a slice or array type, such as []string or []interface{}.
  • Test the updated code with the same input to see if the error is resolved.

Example

// Before
type ResponsesFunctionCallOutput struct {
    output string
}

// After
type ResponsesFunctionCallOutput struct {
    output []string
}

Notes

  • The exact fix will depend on the specific requirements of the OpenClaw library and the expected output type.
  • This solution assumes that the output field is supposed to be an array, but if it's supposed to be a string, the fix will be different.

Recommendation

  • Apply workaround: Update the ResponsesFunctionCallOutput struct to match the actual output type, as this will likely resolve the type mismatch error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING