Is anyone else having issues with AI Agents failing to parse their own JSON and unable to use GPTo1?

I’ve been running into two major problems with using n8n’s AI Agents.

First of all, more often than not they run into the following error message after 5-10 calls: “Unable to parse JSON response from chat agent.”

Second, whenever I try to use GPTo1 in an AI Agent set up, I get this error: “400 Unsupported value: ‘messages[0].role’ does not support ‘system’ with this model”. This is the case with whichever type of agent I use.

My workflow is pretty standard, I’m just using an agent with an OpenAI chat model, SerpAPI tool and a structured output.

My n8n version is 1.60.0 running on n8n cloud.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Could just be down to the model? Here’s a post on the OpenAI forum with a similar complaint about o1 JSON responses.

Personally would recommend either waiting until o1 comes out of preview or a few months whilst all the bugs are ironned out.

It’s pretty simple to fix this. Just deactivate “Output Content as JSON”.

Simple solution: include your desired structure within the prompt.

I don’t use the output formatter. I started instructing LLMs to give me strict format output long before OpenAI built out the feature. The AI Agent node’s Structured Output Parser leaves a lot to be desired.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.