Postgres memory error
Im working rn on a project wich include an ai agent. I use postgres as memory and gemini as ai model (also openai as fallback). Recently ive started to work on looping message so they will be analysed (in ai agent) in order. After Ive finished the work and started to test it, for some reason the postgres started to give the following error: "Bad request - please check your parameter [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:generateContent: [400 Bad Request] Please ensure that function response turn comes immediately after a function call turn.". I guess that the problem is that for some reason empty content data being stored in memory. I have no idea how to fix it. The workflow doesnt error every execution, buy its happend frequently.
Latest n8n version
Windows 10
Hosted on pikapods
Posted Jul 13, 2026, 10:47 AM UTC