mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[Bug/feature reqeust] auto fill response mime type for json response #814
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AlexChim1231 on GitHub (Nov 19, 2025).
Self Checks
Dify version
1.8.0
Plugin version
0.6.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
In the current implementation in
gemini/llm.py, theapplication/jsonwill only apply if thejson_schemais enabled and it is not null or empty.However, gemini allow output any json without json schema if only specific the response mime type.
I am not sure is this a feature or not.
Here is my approach with minimal change: PR, if user enable json_schema then assume that the response should be json, if user provide a json schema, then also pass it
otherwise we need to add a new parameters like
response_mime_type,is_json_response, etc.✔️ Error log
N/A