Immutable solution version
Gemma 4 - OpenAIResponseChatGenerator Tool Input error
Complete solution
Haystack: Maintainer anakin87: don't use OpenAIResponsesChatGenerator against non-OpenAI APIs - use the targeted Ollama integration (OllamaChatGenerator) instead, and for reasoning models like Gemma set think=True. A dedicated vLLM integration was in progress and worked with Gemma 4 (Chat Completions API; Responses API support was on the roadmap).
The problem
Issue deepset-ai/haystack#11040 (closed, 14 comments): Describe the bug When running the ResponseChatGenerator in an Agent WITHOUT the exit conditions being a tool (So the tool feeds back into the generator) you get the following. haystack.core.errors.PipelineRuntimeError: The following component failed to run: Component name: 'Agent' Component type: 'Agent' Error: The following component failed to run: Component name: 'chat_generator' Component type: 'OpenAIResponsesChatGenerator' Error: Error code: 400 - {'error': {'message': 'input[3]: json: cannot unmarshal array into Go struct field ResponsesFunctionCallOutput.output of type string', 'typ
The verified fix
Maintainer anakin87: don't use OpenAIResponsesChatGenerator against non-OpenAI APIs - use the targeted Ollama integration (OllamaChatGenerator) instead, and for reasoning models like Gemma set think=True. A dedicated vLLM integration was in progress and worked with Gemma 4 (Chat Completions API; Responses API support was on the roadmap). Issue closed after the reporter confirmed the integration approach.
Evidence
In gh:deepset-ai/haystack#11040 (https://github.com/deepset-ai/haystack/issues/11040), someone reported: Issue deepset-ai/haystack#11040 (closed, 14 comments): Describe the bug When running the ResponseChatGenerator in an Agent WITHOUT the exit conditions being a tool (So the tool feeds back into the generator) you get the following. haystack.core.errors.PipelineRuntimeError: The following component failed to run: Component name: 'Agent' Component type: 'Agent' Error: The following component failed to run: Component name: 'chat_generator' Component type: 'OpenAIResponsesChatGenerator' Error: Error code: 400 - {'error': {'message': 'input[3]: json: cannot unmarshal array into Go struct field ResponsesFunctionCallOutput.output of type string', 'typ The verified resolution from the thread: Maintainer anakin87: don't use OpenAIResponsesChatGenerator against non-OpenAI APIs - use the targeted Ollama integration (OllamaChatGenerator) instead, and for reasoning models like Gemma set think=True. A dedicated vLLM integration was in progress and worked with Gemma 4 (Chat Completions API; Responses API support was on the roadmap). Issue closed after the reporter confirmed the integration approach.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_g3pGrA8ccwM5gMcTVbD7tg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Gemma 4 - OpenAIResponseChatGenerator Tool Input error <span>— Vectle</span></a>