Drupal is a registered trademark of Dries Buytaert
drupal 10.6.11 Update released for Drupal core (10.6.11)! drupal 11.3.12 Update released for Drupal core (11.3.12)! drupal 11.2.14 Update released for Drupal core (11.2.14)! drupal 10.5.12 Update released for Drupal core (10.5.12)! cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)!

One Drupal AI provider that reaches every model a Cloudflare AI Gateway fronts (OpenAI, Anthropic, Google, Workers AI and more), with the gateway's caching, logging and cost analytics.

The AI module is how Drupal connects to AI services. This provider points it at a single Cloudflare AI Gateway, so every AI feature in your site (the Explorer, Automators, Chatbot, AI Search and more) can use any model the gateway offers, all through one connection.

With unified billing on the gateway, you do not need a separate API key for each vendor: Cloudflare bills your account directly and every model is available. If you prefer, you can bring your own provider keys, held in the gateway rather than in Drupal. Either way, no provider key is stored in your Drupal site.

Features

  • One provider for every model the gateway fronts, instead of installing a separate provider module for each vendor.
  • Chat and embeddings, available to every part of the AI module.
  • The gateway's caching, request logging, cost analytics and fallbacks, applied across all upstream models.
  • A model picker that filters the gateway's live model catalogue by provider, so you choose exactly which models to expose.
  • Credentials (account ID and token) live in settings.php, never in configuration or the database.

Use it when you want one place to manage models, spend and observability across several AI vendors, or when you want Cloudflare's caching and analytics in front of your AI calls.

Post-Installation

After enabling the module:

  1. In the Cloudflare dashboard, create an AI Gateway and an API token for it. Note your account ID and the gateway slug.
  2. Add a credential set at Configuration > Web services > Cloudflare credentials, giving it a machine name. Put its account ID and token in settings.php, keyed by that machine name:
    $settings['cloudflare']['credentials']['my_gateway'] = [
      'account_id' =  'your-account-id',
      'token' =  'your-token',
    ];
  3. Add a gateway at Configuration > Web services > Cloudflare AI Gateways, setting its slug and selecting the credential set.
  4. Go to Configuration > AI > Providers > Cloudflare AI Gateway, select the gateway, and choose the chat and embeddings models to expose. Filter by provider to find models in the gateway's live catalogue.

The models you select become available to every AI feature that uses this provider.

Additional Requirements

This module requires the AI module and the Cloudflare AI Gateway module, which in turn requires Cloudflare SDK. Installing with Composer pulls in all of them:

composer require drupal/ai_provider_cloudflare_gateway

While the suite is in alpha, require it as drupal/ai_provider_cloudflare_gateway:^1.0@alpha (or set your project's minimum-stability to alpha) so the pre-stable releases resolve. You also need a Cloudflare account with an AI Gateway configured.

Any module in the AI ecosystem benefits from this provider, since they route their requests through it. Examples include AI Chatbot, AI Search and AI Automators, all submodules of the AI module.

Similar projects

Single-vendor providers such as OpenAI Provider and Anthropic Provider connect the AI module to one vendor each. This provider instead fronts many vendors through a single Cloudflare AI Gateway, and adds the gateway's caching, cost analytics and fallbacks across all of them. Use a single-vendor provider if you only need one vendor and no gateway; use this one to consolidate several vendors, billing and observability behind one connection.

Supporting this Module

Issue reports, patches and feedback are welcome in the project's issue queue.

Community Documentation

Documentation for the Drupal AI module is available at project.pages.drupalcode.org/ai.

Activity

Total releases
2
First release
Jun 2026
Latest release
3 hours ago
Release cadence
0 days
Stability
0% stable

Releases

Version Type Release date
1.0.0-alpha2 Pre-release Jun 21, 2026
1.0.0-alpha1 Pre-release Jun 21, 2026