AiProvider plugin filtering out o3 models

Created on 20 March 2025, 3 months ago

Problem/Motivation

Currently only the modals matching o1 will appear and only models without the mini in their name for the ChatJsonOutput operation type such as:

        case 'chat':
          if (!preg_match('/^(gpt|text|o1)/i', $model['id'])) {
            continue 2;
          }

      // Allow gpt-4o and gpt-4-turbo, but not gpt-4o-mini.
      if (in_array(AiModelCapability::ChatJsonOutput, $capabilities) && (!preg_match('/^(gpt-4o|o1|gpt-4-turbo)/i', $model['id']) || preg_match('/(mini)/i', $model['id']))) {
        continue;
      }

Steps to reproduce

The method getModels in the AiProvider Plugin has hard coded models in the preg_match calls to filter models so all the o3 models will not appear as options and any model with mini the model name is filtered out for the Chat with Complex Json Settings in /admin/config/ai/settings

Proposed resolution

There are clearly reasons this filtering logic was used. It likely is too difficult to maintain this logic with new models being released all the time. It may be up to the Site Builder to determine if a model is not suitable ie: trying to convert an image to text and selected model does not support image processing.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇨🇦Canada blainelang

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

Comments & Activities

Production build 0.71.5 2024