Subject: Bug Report: Gemini API Integration Fails with "Internal Error" in DEVONthink Server 4.0.2

System Details:

  • DEVONthink Version: DEVONthink Server 4.0.2

  • macOS Version: macOS 26 Tahoe

  • Device: MacBook Pro 14-inch

Problem Description: The built-in AI integration with Google’s Gemini API is consistently failing. Any attempt to use a Gemini-powered feature (e.g., summarize, ask a question) on a document results in a generic error message, preventing the use of the functionality.

Steps to Reproduce:

  1. Ensure a valid Google Gemini API key is entered in DEVONthink’s AI settings.

  2. Select any document (e.g., a PDF or text file) within a database.

  3. Navigate to Tools > Summarize & Analyze and select a Gemini-powered action, or use the AI chat/query feature.

  4. The action attempts to run for a moment before failing.

Actual Result: An error dialog appears with the message: “An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting

Expected Result: The Gemini AI should process the selected document and return the expected output (e.g., a summary, an answer to a question) without error.

Additional Context & Troubleshooting:

  • This feature was working perfectly until approximately three weeks ago (around the first week of August 2025). No changes were made to my system or DEVONthink configuration during that time.

  • To confirm the validity of my API key, I have tested it directly via the command line (curl) to access the Gemini API. The key works correctly and returns a valid response from Google’s servers.

  • I have tried generating a completely new API key from Google AI Studio and configuring it in DEVONthink, but the same error persists.

  • I have tried resetting DEVONthink’s settings and restarting the application and my computer multiple times.

The issue appears to be specific to the API request being sent from within the DEVONthink application, as the API key itself is functional. All other APIs such as ChatGPT or Claude are normal.

Thank you for your time and assistance in looking into this issue. Please let me know if you require any logs or further information.

Thank you for the bug report! This is unfortunately an issue of the Gemini API which suddenly doesn’t accept officially documented safety settings anymore. The next release will work around this by changing these settings.

1 Like