Install
Works with Drupal: ^11.1 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Changes since 1.0.0-beta2.
Highlights
- Native (non-OpenAI) inference. A backend can now own chat execution through the opt-in AiInferenceBackendInterface, so a service that does not speak the OpenAI REST protocol works end to end instead of only showing up in the catalog. Additive: backends that do not implement it — including ones contributed by other modules — are dispatched exactly as before, and the pre-call gate, per-server usage limits, usage recording, smart routing, fact check and governance stay shared by both paths.
- Anthropic (Claude) backend, speaking the native Messages API: system-prompt hoisting, multi-turn content blocks, tool calling both ways, vision and PDF input, structured output (emulated with a forced tool), extended thinking driven by the model's reasoning effort, SSE streaming and cache-aware token accouninated /v1/models catalog and prefills price,
context and features per Claude generation.
- DeepSeek backend, OpenAI-compatible at a fixed eith list prices, context length and quality tier
prefilled for deepseek-chat and deepseek-reasoner.
- Time-of-day pricing in smart routing. DeepSeek bule — list price 00:30–16:30 UTC, a flat per-modeldiscount outside that window (currently 50% off deepseek-chat, 75% off deepseek-reasoner). The router now asks the backend for a
price multiplier and applies it at decision time, epSeek model competes on its discounted cost and can
win a route it would lose at 10:00 UTC — and stopseturn, with no configuration and no cron. Stored
costs stay at list price, so what you see (and canr drifts. New backends express their own schedule by
overriding getPriceMultiplier(); backends that do e.
- Extra request parameters (YAML), per model. Mergequest, so provider-native parameters the module
does not model itself — most usefully a provider's: [{type: web_search}], the OpenRouter web plugin,
xAI Live Search) — are reachable from the UI with . Presets ship in definitions/extra_params.yml;
model, messages, stream and stream_options are str
Fixes
- The server form is savable again when a providerenRouter sends pricing: "-1" for dynamic-priced
models (openrouter/auto), which was stored as −100he cost fields have a minimum of 0, the browser then
blocked submission of the whole form and no model uding turning on embeddings. Such sentinels are now
treated as unknown cost. Fixes #3618874.
- Re-discovery no longer deletes hand-made model dity for the same raw model — la forma soportada de
correr un modelo bajo dos configuraciones — now sustill offers that model.
- Non-chat operations on a native backend are refused with an explanation (AiMissingFeatureException) instead of being sent over
the OpenAI protocol to a server that does not speafusing 404 from a non-existent endpoint.
Upgrading
1. composer update drupal/ai_provider_universal
2. drush updb — update 10103 clears already-storediscovered OpenRouter models on beta2 need this
before the server form will save.
3. Optional: on a model page, check Cost per 1M toack empty and fill it in if you route on cost.
Known limitations
- The Anthropic mapping is covered by kernel tests yet been verified against the live API.
- DeepSeek list prices and the off-peak percentageagainst DeepSeek's pricing page before routing on
cost. Discovery never overwrites a cost you edited
Requirements
- Drupal 11.1+ / 12
- AI ^1.3
- Key
Install: composer require 'drupal/ai_provider_univ