Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Universal AI Provider

No security coverage Under active development 2 sites

Part of the AI ecosystem · 343 projects

This module allows Drupal to connect to multiple AI services, including local models and hosted APIs, under a single provider. It enables intelligent routing of requests to the most cost-effective or suitable AI model, with optional features for fact-checking and content verification.

Universal AI Provider is a multi-instance provider for the Drupal AI ecosystem. It lets you mix local LLM engines (llama.cpp, Ollama, vLLM), commercial cloud APIs (OpenRouter, Groq, Fireworks, Hugging Face, xAI/Grok, Anthropic, DeepSeek, amazee.ai, LiteLLM) and decision models (TypeSafe Jev, self-hosted Laya, OpenAI gpt-6-luna) under one configuration.

It brings cost-aware model routing with failover, claim-level fact-checking, AI & plagiarism detection, and EU AI Act (Art. 50) compliance tools into Drupal without core patches.

Key Features

  • Multi-Server & Multi-Key Architecture: Run multiple local and cloud server instances concurrently. Each server entity manages its own API keys, timeouts, model filters, and daily budget/rate limits.
  • Models as Configuration: Discovered models are stored as exportable ai_universal_model entities. Configure cost rates, quality tiers, context limits, sampling parameters, and capability tags per model.
  • Decision models: Typed questions (yes/no probability, choice, score) answered with calibrated probabilities instead of generated text — TypeSafe Jev, self-hosted Laya, or OpenAI's gpt-6-luna. Reachable as chat and text classification on any AI version, and as AI core's Decision operation on AI 1.6+.
  • Failover: A server that is unreachable, rate-limited or out of quota is marked down and skipped; the failed call is retried on the route's next candidate. A route can put a local model first and a hosted one as fallback, so data leaves the site only when the local model is down.
  • Standard-Compliant Naming: Uses dot-separated entity IDs (server.model) for compatibility with Drupal AI core and ai_search out of the box.
  • Extensible Plugin API: Build custom backends using AiServerBackend plugins without modifying the multi-server UI or routing engine.

Video Demo

Watch: Drupal AI Factchecker — Claim-Level Fact-Checking on AMD (ROCm + vLLM) (2 min)

Supported Backends (14)

Backend Plugin Primary Target Features & Metadata openai_compatible llama.cpp, vLLM, LM Studio, any OpenAI-protocol server Custom base URLs; context detected from the server, cost set manually. ollama Local Ollama instances Auto-enriches model metadata via /api/show; zero-cost routing defaults. ollama_cloud ollama.com Cloud catalog integration with manual routing metadata. openrouter OpenRouter API Live model catalog with pricing and context length. groq GroqCloud Live pricing, context and supported features (tools, JSON, structured output, reasoning). fireworks Fireworks AI Serverless catalog with a maintained price table. huggingface Hugging Face Inference Providers Cheapest live provider offer per model. grok xAI (Grok) Grok API integration. amazee amazee.ai Managed, region-pinned LiteLLM. litellm LiteLLM Proxy Prices and context from the proxy's model info. anthropic Anthropic Claude Native Messages API (not the OpenAI protocol). deepseek DeepSeek Peak / off-peak pricing applied by smart routing in real time. typesafe TypeSafe Jev, self-hosted Laya Native System One API: typed decisions with calibrated confidence. openai_decisions OpenAI gpt-6-luna OpenAI Decisions API, translated to the same questions and answers as typesafe.

Submodules

  • Smart Router (ai_provider_universal_router): Defines virtual route.* models that send each request to the cheapest capable model, with failover when a server is down or over its limits. Routing compares real cost, including time-of-day pricing — a DeepSeek model can win a route off-peak and lose it at peak, automatically.
  • Fact Check, Plagiarism & Content Review (ai_provider_universal_factcheck): Claim verification against your own indexed content or web evidence, AI writing detection, verbatim plagiarism search, scheduled node scans, and bias flags. Decision models can be the checker.
    Bias ratings are not shipped: import a ratings file you are licensed to use, or fetch them live from the MBFC API with your own key.
  • Content Governance (ai_provider_universal_governance): Assists with EU AI Act (Art. 50) obligations by attaching guardrails, generating AI provenance metadata, and adding machine/human-readable content disclosures.
  • Decision (ai_provider_universal_decision, experimental): Implements AI core's Decision operation (AI 1.6+), so AI core's guardrails, automators and the Decision explorer reach Jev, Laya and Luna, with route failover between them.
  • Terms & Privacy Analyzer (experimental): reads terms of service or a privacy policy, pasted or by URL, and returns findings in 19 categories, each quoting the clause it comes from. Measured on Spanish documents only so far.

ECA & Automation Integration

All submodules integrate with the ECA (Event-Condition-Action) ecosystem out of the box:

  • Trigger automated workflows when a fact-check scan flags unverified claims.
  • Block or flag publishing workflows if plagiarism or AI-content thresholds are exceeded.
  • Attach provenance and disclosure metadata automatically upon node save.

Requirements & Compatibility

  • Drupal: ^11.1 || ^12
  • PHP: ^8.3
  • Drupal AI Core: ^1.5 (the Decision submodule needs 1.6+)
  • Patches Required: None

Quick Start

# Install via Composer (beta releases)
composer require 'drupal/ai_provider_universal:^1.0@RC'

# Enable the module and the submodules you need
drush en ai_provider_universal ai_provider_universal_router ai_provider_universal_factcheck ai_provider_universal_governance

# Run database updates when upgrading
drush updb

Ask your assistant about Universal AI Provider

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Jul 2026
Latest release
3 days ago
Releases (12 mo)
7 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-rc1 Pre-release 11 PHP ^8.3 Oct 11, 2026
1.0.0-beta4 Pre-release 11 PHP ^8.3 Oct 7, 2026
1.0.0-beta3 Pre-release 11 Aug 26, 2026
1.0.0-beta2 Pre-release 11 Jul 15, 2026
1.0.0-beta1 Pre-release 11 Jul 10, 2026
1.0.0-alpha1 Pre-release 10–11 Jul 5, 2026
1.0.x-dev Dev 11 Jul 2, 2026