Search by

vectorbross / vb_ai_provider_openai

vectorbross

Adds the OpenAI provider on top of VB AI Core.

Package info

bitbucket.org/vectorbross/vb_ai_provider_openai

Type:drupal-recipe

pkg:composer/vectorbross/vb_ai_provider_openai

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

dev-master 2026-11-27 11:16 UTC

This package is not auto-updated.

Last update: 2026-12-03 21:52:18 UTC


README

Adds the OpenAI provider on top of VB AI Core. Applying this recipe applies vb_ai_core first, enables the OpenAI provider, creates the openai_api_key key entity and sets OpenAI as the default provider.

What it installs

ModulePurpose
vb_ai_core (recipe)AI framework, key and token (see core)
ai_provider_openaiOpenAI provider for the AI module

Requirements

  • Drupal 11.4+
  • Drush 13+
  • The project setup from vb_ai_core (composer/installers 2.3+, the recipes/{$name} install path and the VB repositories entry). See the VB AI Core README.

Project setup

1. Require the recipe

ddev composer require vectorbross/vb_ai_provider_openai

This also pulls in vectorbross/vb_ai_core and drupal/ai_provider_openai.

2. Set the API key in settings.php

The API key is not stored in config or in an env file. It is set in settings.php (or settings.local.php, which is gitignored) as a config override on the openai_api_key key entity:

$config['key.key.openai_api_key']['key_provider'] = 'config';
$config['key.key.openai_api_key']['key_provider_settings']['key_value'] = 'sk-your-openai-key';

Never commit the real key. On production, put it in the server's settings.php / settings.local.php, outside version control.

Apply the recipe

Run from the project root. Drush runs from the web docroot, so the path starts with ../recipes.

ddev drush recipe ../recipes/vb_ai_provider_openai
ddev drush cr

Verify

ddev drush pm:list --status=enabled --filter=ai_provider_openai

Then check the provider and the default models at /admin/config/ai/providers. The key at /admin/config/system/keys should show the override from settings.php.

Notes

  • The key entity is exported as config, but the value comes from the settings.php override, so no secret lands in git.
  • Only one provider recipe should set the default provider. Applying another provider recipe afterwards makes that one the default.

Changelog

See CHANGELOG.md.

License

GPL-2.0-or-later. See LICENSE.txt. The OpenAI name and logo are trademarks of OpenAI and are used here only to identify the provider.