Install
Works with Drupal: ^10 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
This release sends PDFs and other documents attached to a chat message to Gemini; before, only images reached the model. It also removes the Response Schema and Response MimeType chat settings, which never had any effect. Sites with google-gemini-php/client 2.8 installed need an extra Composer flag to get this release; see the upgrade notes below.
Contributors (2)
lekso surameli, tazo_vekua
Bug fixes
- #3589193 PDF file upload gives wrong response
- Chat sends every file attached to a message, not only images. A PDF uploaded in the Chat Explorer used to be dropped, so Gemini answered without seeing it.
- Files Gemini cannot read, such as Word documents, fail with an
AiResponseErrorExceptionnaming the file type instead of being dropped silently. - Non-streamed chat responses have the
assistantrole instead of an empty role.
- #3589192 Response schema and Response mimtype is useless - Json is in advanced menu
- The chat settings no longer show Response Schema and Response MimeType. The provider always discarded both, so they never reached Gemini. Values saved by earlier versions are still ignored.
- Structured output works as before, through the JSON schema set on
ChatInput(Advanced -> JSON Schema in the Chat Explorer). - The 1.1.x releases conflict with google-gemini-php/client 2.8 and later. 1.2.0 will move structured output to that version's
responseJsonSchemaand require it.
Upgrade notes
If your composer.lock has google-gemini-php/client 2.8, composer update drupal/gemini_provider stays on 1.1.0 without an error. Run composer update drupal/gemini_provider --with-dependencies instead: it installs 1.1.1 and moves the client back to 2.7. If another package on your site requires client 2.8, Composer cannot install 1.1.1; stay on 1.1.0 until 1.2.0.
For developers: chat() throws AiResponseErrorException for an attached file whose type the Gemini client library cannot send. It previously ignored every attachment that was not an image.