vectorbross / vb_ai_provider_openai
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
Requires
- drupal/ai_provider_openai: ^1.2
- drupal/core: ^11.4
- vectorbross/vb_ai_core: ^1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
| Module | Purpose |
|---|---|
vb_ai_core (recipe) | AI framework, key and token (see core) |
ai_provider_openai | OpenAI provider for the AI module |
Requirements
- Drupal 11.4+
- Drush 13+
- The project setup from
vb_ai_core(composer/installers2.3+, therecipes/{$name}install path and the VBrepositoriesentry). 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.phpoverride, 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.