Skip to content

fix: ensure Gemini always receives a non-empty contents array#5229

Merged
HenryHengZJ merged 1 commit intoFlowiseAI:mainfrom
toi500:fix/gemini-empty-contents
Sep 18, 2025
Merged

fix: ensure Gemini always receives a non-empty contents array#5229
HenryHengZJ merged 1 commit intoFlowiseAI:mainfrom
toi500:fix/gemini-empty-contents

Conversation

@toi500
Copy link
Copy Markdown
Contributor

@toi500 toi500 commented Sep 18, 2025

If you disable memory from an agent when using Gemini models, it gets bugged.
[400 Bad Request] * GenerateContentRequest.contents: contents is not specified

Converting system messages as user input if memory is disabled will not work this time, since the Gemini will perform very differently without system prompt. The trick would be to inject a placeholder, like 3 dots (...), as chat history when memory is disabled for this model.

@HenryHengZJ HenryHengZJ merged commit fc50f23 into FlowiseAI:main Sep 18, 2025
2 checks passed
erhhung pushed a commit to erhhung/flowise that referenced this pull request Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants