Parameter Extractor fails with Gemini: Invalid text content type: <class 'list'> #21324

Closed
opened 2026-02-21 20:11:59 -05:00 by yindo · 1 comment
Owner

Originally created by @55Kamiryo on GitHub (Dec 28, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  • Create a workflow with a Parameter Extractor node.
  • Set the model to Gemini (via plugin/LLM provider).
  • Run the workflow with a plain string input.
  • Observe the execution failure.
Image Image

✔️ Expected Behavior

Parameter Extractor should successfully extract parameters when given a plain string input. Using other models (e.g., OpenAI) works as expected (see attached screenshot).

Image Image

Actual Behavior

The node fails with Invalid text content type: <class 'list'>. Expected str. and the workflow aborts even though the input is a string.

ERROR [GraphDispatcher] Node ... failed with ABORT strategy: Invalid text content type: <class 'list'>. Expected str.
ERROR [workflow_entry.py:111] Unknown Error when workflow entry running
RuntimeError: Invalid text content type: <class 'list'>. Expected str.

Originally created by @55Kamiryo on GitHub (Dec 28, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce - Create a workflow with a Parameter Extractor node. - Set the model to Gemini (via plugin/LLM provider). - Run the workflow with a plain string input. - Observe the execution failure. <img width="643" height="242" alt="Image" src="https://github.com/user-attachments/assets/b44d583d-8721-4284-ad05-8a7b4075a85b" /> <img width="640" height="283" alt="Image" src="https://github.com/user-attachments/assets/0545ba86-ebd1-493a-80cd-aa74ae854246" /> ### ✔️ Expected Behavior Parameter Extractor should successfully extract parameters when given a plain string input. Using other models (e.g., OpenAI) works as expected (see attached screenshot). <img width="644" height="207" alt="Image" src="https://github.com/user-attachments/assets/127293a8-862c-4f94-8d9d-6717493bc787" /> <img width="645" height="284" alt="Image" src="https://github.com/user-attachments/assets/8014a7f2-9be4-4712-ae90-d5d3f4a3b367" /> ### ❌ Actual Behavior The node fails with Invalid text content type: <class 'list'>. Expected str. and the workflow aborts even though the input is a string. > ERROR [GraphDispatcher] Node ... failed with ABORT strategy: Invalid text content type: <class 'list'>. Expected str. > ERROR [workflow_entry.py:111] Unknown Error when workflow entry running > RuntimeError: Invalid text content type: <class 'list'>. Expected str.
yindo added the 🐞 bug label 2026-02-21 20:11:59 -05:00
yindo closed this issue 2026-02-21 20:11:59 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 28, 2025):

Hi @55Kamiryo! I'm Dosu and I’m helping the dify team.

This error happens because the Gemini model can return its response as a list (multi-modal format), while the Parameter Extractor node was expecting a string. Other models like OpenAI return a string, so they work fine.

A fix for this was merged in PR #30070: the Parameter Extractor now uses the get_text_content() method, which correctly handles both string and list formats from LLM responses. Updating your Dify installation to a version that includes this fix will resolve the issue with Gemini and Parameter Extractor compatibility.

For reference, this fix closes issue #30069 and is tracked in issue #30270.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 28, 2025): <!-- Greeting --> Hi @55Kamiryo! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> This error happens because the Gemini model can return its response as a list (multi-modal format), while the Parameter Extractor node was expecting a string. Other models like OpenAI return a string, so they work fine. A fix for this was merged in PR [#30070](https://github.com/langgenius/dify/pull/30070): the Parameter Extractor now uses the `get_text_content()` method, which correctly handles both string and list formats from LLM responses. Updating your Dify installation to a version that includes this fix will resolve the issue with Gemini and Parameter Extractor compatibility. For reference, this fix closes issue [#30069](https://github.com/langgenius/dify/issues/30069) and is tracked in [issue #30270](https://github.com/langgenius/dify/issues/30270). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/52877640-f503-43a2-aefd-756d4e5ffd3a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/52877640-f503-43a2-aefd-756d4e5ffd3a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/52877640-f503-43a2-aefd-756d4e5ffd3a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/52877640-f503-43a2-aefd-756d4e5ffd3a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/52877640-f503-43a2-aefd-756d4e5ffd3a?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/52877640-f503-43a2-aefd-756d4e5ffd3a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/52877640-f503-43a2-aefd-756d4e5ffd3a?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20error%20happens%20because%20the%20Gemini%20model%20can%20return%20its%20response%20as%20a%20list%20%28multi-modal%20format%29%2C%20while%20the%20Parameter%20Extractor%20node%20was%20expecting%20a%20string.%20Other%20models%20like%20OpenAI%20return%20a%20string%2C%20so%20they%20work%20fine.%0A%0AA%20fix%20for%20this%20was%20merged%20in%20PR%20%5B%2330070%5D%28https%3A//github.com/langgenius/dify/pull/30070%29%3A%20the%20Parameter%20Extractor%20now%20uses%20the%20%60get_text_content%28%29%60%20method%2C%20which%20correctly%20handles%20both%20string%20and%20list%20formats%20from%20LLM%20responses.%20Updating%20your%20Dify%20installation%20to%20a%20version%20that%20includes%20this%20fix%20will%20resolve%20the%20issue%20with%20Gemini%20and%20Parameter%20Extractor%20compatibility.%0A%0AFor%20reference%2C%20this%20fix%20closes%20issue%20%5B%2330069%5D%28https%3A//github.com/langgenius/dify/issues/30069%29%20and%20is%20tracked%20in%20%5Bissue%20%2330270%5D%28https%3A//github.com/langgenius/dify/issues/30270%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/30270)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21324