Invalid isUsable() function

Created on 20 February 2025, about 2 months ago

Problem/Motivation

Other modules that depend on the Azure AI Provider need to be able to call established provider functions and have them work as expected. In this case, AI Content Suggestions is unable to utilize Azure AI Provider due to an incorrect function implementation for isUsable(). This results in an AJAX error and errors in the log. Content Suggestions cannot adjust for this because the AI core function loadProviderFromSimpleOption() is what calls isUsable.

Steps to reproduce

Install AI Core, AI Content Suggestions, and Microsoft Azure AI. Configure Content Suggestions to use Azure. Edit/add content and then use the fields to get suggestions.

Proposed resolution

Update isUsable() to operate in line with the documentation provided by AI Core (it needs to handle a NULL $operation_type). Simply returning FALSE in this case breaks things.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States srees

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