fact check demo on youtube

This project is not covered by Drupal’s security advisory policy.

Universal AI Provider is an enterprise-grade multi-instance provider for the Drupal AI ecosystem. It allows you to seamlessly mix local LLM engines (llama.cpp, Ollama, vLLM) and commercial cloud APIs (OpenRouter, Groq, Fireworks, Hugging Face, xAI/Grok, amazee.ai, LiteLLM) under a unified configuration framework.

It brings cost-aware model routing, claim-level fact-checking, AI & plagiarism detection, and EU AI Act (Art. 50) compliance tools directly into Drupal without requiring 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.
  • Standard-Compliant Naming: Uses dot-separated entity IDs (server.model) for 100% 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

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

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


Supported Backends (11)

Backend Plugin Primary Target Features & Metadata
openai_compatible llama.cpp, vLLM, LM Studio, OpenAI REST API Custom base URLs, manual cost/context configuration.
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 Dynamic model catalog, automatic pricing sync, and fallback routing.
groq Groq Cloud LPU High-speed inference, context/token rate limit tracking.
fireworks Fireworks AI Serverless LLM deployment catalog integration.
huggingface Hugging Face Dedicated Endpoints / TGI Custom model endpoint support.
grok_xai xAI (Grok) Native Grok API integration.
amazee_ai amazee.ai Enterprise-hosted AI backend support.
litellm LiteLLM Proxy Unified proxy routing across 100+ LLMs.
Anthropic Claude and native message api. Anthropic native api support (not using openai)
Deepseek deepseek.ai endpoint smart route using peak and non peak hour prices.

Submodules

  • Smart Router (ai_universal_router): Defines virtual Auto: ... models that route requests dynamically to the cheapest capable model, featuring automated failover on rate/budget limits. Smart routing compares real cost, including time-of-day pricing — a DeepSeek model can win a route during off-peak hours and lose it at peak, automatically.
  • Fact Check, Plagiarism & Content Review (ai_universal_factcheck): Conducts claim verification against local indexed corpus or web evidence, AI writing detection, verbatim plagiarism search, scheduled node scans, and coverage report flags for bias detection.
  • Content Governance (ai_universal_governance): Assists with EU AI Act (Art. 50) obligations by attaching guardrails, generating AI provenance metadata, and adding machine/human-readable content disclosures.

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.3
  • Patches Required: None

Quick Start

# Install via Composer
composer require drupal/ai_provider_universal

# Enable module and submodules
drush en ai_provider_universal ai_universal_router ai_universal_factcheck ai_universal_governance

# Run database updates (if upgrading from 1.0.0-beta1)
drush updb

Project information

Releases