Skip to content

Issue #3469178 by marcus_johansson: Add provider and model feature flags for filtering

Marcus Johansson requested to merge ai-provider-feature-flag into 1.0.x

See ticket https://www.drupal.org/project/ai/issues/3469178

This makes it possible to:

  1. List all models with specific features - $provider->getConfiguredModels('chat', [AiModelCapability::ChatWithImageVision]);
  2. Check if a provider has specific features - $provider->supportsCapability(AiProviderCapability::StreamChatOutput);
  3. Also fixes the helper method on the provider plugin for this.

Note that this makes breaking changes to the ai provider interface, so we need to contact the person that does the Gemini provider, if this will be in the next release.

Merge request reports