Unset default settings on provider uninstall

Created on 2 January 2025, 20 days ago

Problem/Motivation

Currently a provider module can automatically set itself as a default model for an operation type when its configured. The user can also visit /admin/config/ai/settings and do the same thing.

However if the user chooses to uninstall the provider or remove the configuration that default setting is not revoked, causing warning or worse issues up to WSOD on pages that might have some third party module that has an requirement to use it.

This might not 100% fix the issue if the 3rd party module does not follow documentation, but at least this is a case that is documented.

Proposed resolution

  1. In hook_uninstall check if the uninstalled module is an provider module and if it is setup a default model. If so, remove it from default models.
  2. Add a method to the plugin manager, where a provider can declare that its been disabled/have removed configuration, similar to how the default settings work. Add so that this removes the default model settings.
📌 Task
Status

Active

Version

1.0

Component

AI Core module

Created by

🇩🇪Germany marcus_johansson

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

Comments & Activities

Production build 0.71.5 2024