SetupAiProvider throws errors if a provider isn't available

Created on 12 March 2025, 22 days ago

Problem/Motivation

The Drupal CMS AI recipe attempts to set up both the OpenAI and Anthropic provider. SetupAiProvider goes through the full process even if there is no API key to set. This means there is no way to tell it to "not try". This can cause an exception if the provider is not available (e.g. another provider extends and disables the plugin).

Steps to reproduce

Install and configure the Amazee.io provider, then install the Drupal CMS AI recipe - exception even if you pass '' as the API key.

Proposed resolution

If we have no API key, don't attempt to set up the provider.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Feature request
Status

Active

Version

1.0

Component

Providers

Created by

🇬🇧United Kingdom andrewbelcher

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024