Skip to content

AI module integration

DXPR AI Provider works as a drop-in backend for Drupal's AI module ecosystem. Any module that uses the AI module's provider interfaces can route requests through DXPR without needing its own API keys or provider configuration.

Compatible modules

These AI ecosystem modules work with DXPR AI Provider out of the box:

Module Operation How it uses DXPR
AI Assistants API chat Sends conversation messages through the Kavya platform with streaming support
AI CKEditor chat Generates, rewrites, and summarises content inside the CKEditor toolbar
AI Search chat Powers semantic search and retrieval-augmented generation
AI Translate translate_text DXPR's native translation engine replaces the generic chat-based fallback
AI Image (via AI module) text_to_image, image_to_image Generates and edits images using the kavya-image model
AI Content Creator chat Generates structured content for Drupal entities
DXPR CKEditor AI Agent chat AI writing assistant inside CKEditor with streaming
DXPR AI Image Alt Text chat (vision) Generates alt text from uploaded images

Selecting DXPR as the default provider

  1. Navigate to /admin/config/ai/settings.
  2. In the Default providers section, set DXPR AI Provider for each operation type you want it to handle (chat, translate, image generation).
  3. Save the configuration.

Modules that do not specify a provider explicitly will now route through DXPR. Modules that name a specific provider in their own configuration override this default.

Streaming support

DXPR AI Provider supports streamed chat responses. When a consuming module requests streaming (as AI Assistants API does for its chat interface), the module opens a streamed connection to the Kavya API and yields response chunks as they arrive. This provides real-time output in chat interfaces rather than waiting for the full response to complete.

Streaming works with all three model variants (kavya-m1, kavya-m1-eu, kavya-m1-fast).

What the module passes through

System prompts, message history, tool definitions (function calling), and structured output schemas are forwarded to the Kavya API unchanged. Context window management and conversation history remain the consuming module's responsibility. The only addition is the em_dash_mode parameter, which controls server-side em-dash post-processing (see the em-dash guide).