First beta after 1.0.0-alpha1. The feature set for the 1.0 line is considered complete enough for wider testing: ten backends, smart routing, fact check, extensibility events, and admin-tunable prompts. Please report issues on the project issue queue.
Requirements: Drupal ^11.1 || ^12, PHP ^8.3, AI ^1.2, Key ^1.18.
composer require 'drupal/ai_provider_universal:^1.0@beta' drush pm:enable ai_provider_universal # optional: drush pm:enable ai_provider_universal_router ai_provider_universal_factcheck
Development branch: composer require drupal/ai_provider_universal:1.0.x-dev.
A multi-instance AI provider for the Drupal AI module. Infrastructure is modeled as config entities:
ai_universal_server) — one endpoint each (backend, host/key, limits).ai_universal_model) — discovered per server, exportable, with operation types, routing metadata, sampling overrides, and optional catalog features.Optional submodules: Smart Router (cost-aware virtual routes) and Fact Check (claim verification + content scan).
ollama (native /api/show enrichment: true context windows, capabilities, free-cost prefill) and groq (live pricing, context and feature flags from the catalog).ModelPostCallEvent and ModelsDiscoveredEvent join the pre-call gate, and routed calls are tagged (smart_route:<id>, route_complexity:<class>) so the AI core's ai_observability logs attribute every call to its route.ollama) — dedicated local backend; discovery enriches /v1/models via native POST /api/show (context length, family/capabilities); costs prefilled as free for smart routing.groq) — fixed api.groq.com/openai/v1; live pricing, context, modalities, and supported_features from the catalog.ollama for self-hosted daemons, ollama_cloud for ollama.com.-cloud) are not marked free — they are metered on ollama.com, so their costs stay unset for you to fill in.supported_features) persisted on models when the backend publishes them; always refreshed on re-discovery.temperature, top_p, frequency_penalty, presence_penalty) on every chat call; vendor recommendations prefilled from definitions/model_defaults.yml when known.smart_route:<id> / route_complexity:<class> for ai_observability attribution.AdminNotifier + FactcheckNotificationEvent (always dispatched; optional default email via notify_email; ECA/subscribers can suppress mail).drush factcheck:sync-bias-ratings).ModelPreCallEvent — block or swap model before every call (pre-call gate).ModelPostCallEvent — tokens + latency after successful chat.ModelsDiscoveredEvent — adjust discovered models before persistence.UsageThresholdEvent (router) — alert / exhausted daily limits.FactcheckNotificationEvent — admin alerts for scans and settings changes.RunTestsInSeparateProcesses.Still recommended (shipped under patches/, declared in this module’s composer.json). Enable dependency patching with composer-patches:
ai_search embeddings engine parsing for model ids containing double underscores.composer require cweagans/composer-patches composer config extra.enable-patching true composer update drupal/ai
supported_features, sampling), route fields (required_features, verifier), factcheck settings (notify, flood, prompts), router settings (classifier, prompts). Re-export site config after upgrade./admin/reports/ai-router-savings (was /admin/config/ai/providers/universal/routes/log) — update bookmarks. A quick-access button remains on the Smart Routes page.ollama over generic openai_compatible for richer discovery metadata (re-save server / re-run discovery).ai_provider_llama_cpp — recreate servers under this module.ai_provider_universal_router — smart routes, usage-limit enforcement, decision log.ai_provider_universal_factcheck — claim verification, content scan, trusted sites, notifications.Full documentation lives in the package under docs/ and in the project README.
Thank you for testing the beta. Feedback on real-world multi-provider fleets and smart-route savings numbers is especially welcome.