drupal‐cms‐ai recipe does not work with anthropic api key out of the box - michaellenahan/blog GitHub Wiki

Today I was playing with drupal-cms, enabled the drupal-cms-ai recipe, and set my anthropic api key. I don't have an openai key.

When I invoked the chatbot (bottom-left), asked for some help, I got an error.

This was the error in the error log: The chatbot had an error: The "openai" plugin does not exist. Valid plugin IDs for Drupal\ai\AiProviderPluginManager are: anthropic

The problem is that "openai" is set as the default, see: ai_assistant_api.ai_assistant.drupal_cms_assistant.yml

The fix is to go to: admin/config/ai/ai-assistant/drupal_cms_assistant Find the "AI Provider" dropdown near the end of the page, select "Anthropic" and then click Save at the top-right.