The error "AI provider failed to classify image" is a known issue, particularly within the Drupal AI module when using the Huggingface Provider and models like Falconsai/nsfw_image_detection for image moderation. This failure can stem from issues with the AI model itself, such as algorithm flaws, incorrect hyperparameters, overfitting, or problems with the quality or diversity of the training data.
Drupal AI Module Classification Issues
Users frequently encounter the "AI provider failed to classify image" error within Drupal when using Huggingface models like Falconsai/nsfw_image_detection for image moderation.

https://www.drupal.org/forum/support/post-installation/2026-01-27/ai-pro...

Comments

romulasry created an issue. See original summary.

marcus_johansson’s picture

We will do a new release today, test with this. I'm 99% sure its connected to #3574196: HuggingFace provider fails with 410 Gone — API endpoint moved to router.huggingface.co

romulasry’s picture

Sill gettting AI provider failed to classify image as of today when I updated.

romulasry’s picture

I still get that error here: https://www.nextgenchan.org/node/8 after I deleted cache so the bug still applies.

marcus_johansson’s picture

Can you verify which version of the Huggingface provider you have.

romulasry’s picture

Sub.Machine name: ai_provider_huggingface
Version: 1.0.0-beta2
Requires:

AI CoreKey

a.dmitriiev’s picture

The fix mentioned in #3 is included in version 1.0.0-rc1. Please update the module.

romulasry’s picture

Just updated still get AI provider failed to classify image.

romulasry’s picture

Version: 1.0.0-beta2 » 1.0.0-rc1
romulasry’s picture

Still doesn't work.