Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

AI Effort

Security covered Under active development

Part of the AI ecosystem · 358 projects

This module provides a unified way to manage AI reasoning effort levels across different AI providers. It translates a standardized scale (none, minimal, low, medium, high, xhigh, max) into the specific terminology and configuration of each provider, ensuring consistent control over AI response complexity.

One reasoning effort level for every AI provider.

Each vendor names its reasoning control differently: Anthropic output_config.effort, OpenAI and OpenRouter reasoning_effort / reasoning.effort, Gemini thinkingConfig.thinkingLevel. This module gives consumers one scale and one way to ask, and translates the level for each provider.

Scale

none, minimal, low, medium, high, xhigh, max. Each model accepts a subset.

Consumer API

use Drupal\ai_effort\EffortManager;

// What to offer: the model's levels, up to the site's ceiling, or NULL.
$levels = \Drupal::service(EffortManager::class)->levels('openrouter', 'openai/gpt-5-mini');
// $levels->levels: ['minimal', 'low', 'medium', 'high']; $levels->default: 'medium'.

// What to send: request metadata on the input.
$input->setRequestMetadataValue(EffortManager::METADATA_KEY, 'high');
  • No level: the provider's default.
  • A level the model doesn't offer, or above the site's ceiling: dropped and logged in the ai_effort channel, never sent.
  • Metadata does nothing when this module isn't installed, so consumers can set it without depending on the module.
  • When the request has no output limit, the module sets one for medium and above (4096 to 16384 tokens), because reasoning counts against it.

Providers

Provider Levels from Sent as OpenRouter /models reasoning.supported_efforts, cached for a day reasoning.effort Gemini (3.x) Table in the adapter thinkingConfig (ThinkingConfig object) Cloudflare AI Gateway Table: Workers AI gpt-oss, Google AI Studio Gemini 3.x reasoning_effort Any provider with its own effort or reasoning_effort select, e.g. Anthropic 1.3, OpenAI The provider's select options That key

Anthropic Provider 1.2.x calls Anthropic's OpenAI-compatible endpoint, which ignores effort; use 1.3.

Adapters are EffortAdapter plugins. An adapter names the provider IDs it handles and, optionally, a module it needs.

Requirements

Configuration

/admin/config/ai/effort: the highest level requests may use. Needs the "administer ai" permission.

Related issues

  • AI #3586787: a provider-agnostic reasoning effort control in AI core. This module would retire once core has it.
  • AI #3586788: streamed chat from OpenAI-type providers reports 0 reasoning and cached tokens.
  • AI #3586789: PostStreamingResponseEvent has an empty configuration.
  • OpenRouter Provider #3627909: the provider's own Reasoning Effort setting is never offered.
  • Anthropic Provider #3607963: 1.3.0-beta2 drops tool calls from streamed responses.

How this module is built

Much of this module's code, tests and documentation was drafted with an AI coding assistant (Claude Code). The maintainers review, test and take responsibility for every change, and the tests and code checks run on drupal.org's CI. Contributions follow Drupal's policy on the use of AI when contributing.

Supporting this module

Developed and maintained by Tyler Brown Cifu Shuster of FivePaths, LLC. Development sponsored by FivePaths.

Drupal 11 · not 10

Ask your assistant about AI Effort

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Oct 2026
Latest release
1 week ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 11 Nov 11, 2026
1.0.0 Stable 11 Oct 20, 2026
1.0.0-beta1 Pre-release 11 Oct 17, 2026
1.0.x-dev Dev 11 Oct 5, 2026