Graceful error handling when an AI Provider is not setup correctly

Created on 29 September 2025, 6 days ago

Problem/Motivation

When the Gemini key is not installed or incorrect, Drupal complains and throws an error that the API key is not installed. This actually prevents any other provider from being used. While it's ideal to have Gemini set up correctly, sometimes we move onto other providers and a lapse occurs with Gemini. This should not prevent us from moving on to other providers.

Steps to reproduce

1. Set up Gemini as provider using Drupal AI for something like a basic chat.
2. Install Search API and Search AI modules.
3. Change the Gemini key to something that won't work.
4. Add a different provider other than Gemini.

Proposed resolution

Make sure that it gracefully catches the provider error and still allows other types of Search API servers to be created.

See related issue proposed in Drupal AI. πŸ› Graceful error handling when an AI Provider is not setup correctly Active

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rraney

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024