Incorrect parameters setting for gemini models on Vertex AI #8665

Closed
opened 2026-02-21 18:26:55 -05:00 by yindo · 2 comments
Owner

Originally created by @fdb02983rhy on GitHub (Feb 26, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.3

Cloud or Self Hosted

Cloud

Steps to reproduce

Image

Structure output parameter name should be 'response_schema' according to the documentation.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @fdb02983rhy on GitHub (Feb 26, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.3 ### Cloud or Self Hosted Cloud ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/8445e9a3-31ef-4009-9b42-74c133d9baf7) Structure output parameter name should be 'response_schema' according to the [documentation](https://ai.google.dev/gemini-api/docs/structured-output?lang=python#:~:text=enum%27%2C%0A%20%20%20%20%20%20%20%20%27-,response_schema,-%27%3A%20Instrument). ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 buggood first issue labels 2026-02-21 18:26:55 -05:00
yindo closed this issue 2026-02-21 18:26:56 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 26, 2025):

The error you're encountering is due to using the incorrect parameter name json_schema instead of response_schema when configuring the Gemini models on Vertex AI. According to the Dify codebase, the integration with Vertex AI's Gemini models uses the json_schema parameter under parameter_rules in the configuration files [1]. However, the correct parameter name for structured output, as per the Vertex AI documentation, should be response_schema. You should update your configuration to use response_schema to resolve this issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Feb 26, 2025): <!-- Answer --> The error you're encountering is due to using the incorrect parameter name `json_schema` instead of `response_schema` when configuring the Gemini models on Vertex AI. According to the Dify codebase, the integration with Vertex AI's Gemini models uses the `json_schema` parameter under `parameter_rules` in the configuration files <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/vertex_ai/llm/gemini-exp-1114.yaml)</sup>. However, the correct parameter name for structured output, as per the Vertex AI documentation, should be `response_schema`. You should update your configuration to use `response_schema` to resolve this issue. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/9eb6c374-d74a-4639-abc5-d30cd42347f1?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9eb6c374-d74a-4639-abc5-d30cd42347f1?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9eb6c374-d74a-4639-abc5-d30cd42347f1?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9eb6c374-d74a-4639-abc5-d30cd42347f1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9eb6c374-d74a-4639-abc5-d30cd42347f1?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/9eb6c374-d74a-4639-abc5-d30cd42347f1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9eb6c374-d74a-4639-abc5-d30cd42347f1?feedback_type=other)</sup>
Author
Owner

@fdb02983rhy commented on GitHub (Feb 28, 2025):

Close due to the upgrade of v1.0, please see https://github.com/langgenius/dify-official-plugins/issues/341

@fdb02983rhy commented on GitHub (Feb 28, 2025): Close due to the upgrade of v1.0, please see https://github.com/langgenius/dify-official-plugins/issues/341
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8665