TypeSafe AI Provider Logo

TypeSafe AI Provider connects TypeSafe AI to Drupal's AI module. Use it to classify and moderate content, route requests, score submissions, and build workflows that act on structured AI results.

TypeSafe's Jev models evaluate text or structured data using three question types:

  • Choice: Select an option from a defined set, with probabilities for each option.
  • Score: Rate input against ordered levels you define, such as customer frustration or issue severity.
  • Noul: Return the probability that a condition holds, such as whether a message requests a refund.

Combine independent questions in one request, then use the results in your Drupal application. See the TypeSafe API reference for the question and response formats.

Building with a coding agent? The official TypeSafe skill helps your agent design questions, batch evaluations, and use current documentation. Installation instructions are included below.

Features

  • Standard Drupal AI text classification with probabilities for every supplied label.
  • Standard Drupal AI moderation against policy categories you define, with a configurable flag threshold and a probability for every category. Use it to screen other providers' requests through Drupal AI's external moderation.
  • A system_one operation for mixed Choice, Score, and Noul questions.
  • Integration with Drupal AI request, response, and exception events.
  • API key management through the Key module.
  • Model discovery, response validation, and token usage metadata.

This provider supports structured evaluations. It does not provide chat generation, embeddings, or image generation. Integrations using system_one must explicitly support that operation.

Requirements

  • Drupal 10.3+ or 11
  • AI 1.3+ (1.x) and Key 1.18+
  • A TypeSafe account and API key

Quickstart

Enable and configure the provider

  1. Install the module: composer require 'drupal/ai_provider_typesafe, then enable it the usual way.
  2. Create an authentication key at /admin/config/system/keys/add. Use a file or environment key provider to keep the secret out of exported configuration.
  3. Open /admin/config/ai/providers/typesafe, select your key, and save. The form checks access to TypeSafe's model list. The same page holds the moderation categories and threshold.
  4. Select TypeSafe in a compatible Drupal AI integration, or call the provider from your own code. To moderate another provider's requests, add typesafe__jev-latest at /admin/config/ai/ai-external-moderation.

Develop with the TypeSafe skill

The skill is optional for development and is not a dependency. Choose one installation method from your project directory.

Claude Code:

claude plugin marketplace add typesafe-ai/skills
claude plugin install typesafe@typesafe-ai

Other supported agents:

npx skills add typesafe-ai/skills --skill typesafe-ai

Select your agent when prompted. You can also read the skill directly or give your agent the raw Markdown. Then ask it to use the TypeSafe skill when working on this project.

See the TypeSafe skill installation guide and TypeSafe documentation for more examples.

 

Ramsalt Norwegian Drupal Agency

Supporting organizations: 
Initial Development and support

Project information

Releases