Description
Instead of setting the API_KEY for the provider using the GUI and a database option, one can also set the env value or a constant in wp-config.php:
// wp-config.php
define( 'MITTWALD_API_KEY', 'sk-5S...' );
This works well, the connectors screen shows this information and displays the provider as connected, all AI requests succeed, the models can fetched, and so on.
In Settings › AI, where you can activate the experiments, the experiments can be activated and with the new Developer mode model controls form 0.9.0 the models can be selected.
The problem is, that the following error is still displayed on the top of the page:
The AI plugin requires a valid AI Connector to function properly. Verify you have one or more AI Connectors configured.
Step-by-step reproduction instructions
- set provider API Key using content or env:
// wp-config.php
define( 'PROVIDER_API_KEY', 'sk-5S...' );
- Validate that the key is configured correctly by checking Settings › Connectors
- Go to Settings › AI
- Error shown despite key is configured correctly
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress 7.0-RC3
- AI-Plugin Version 0.9.0
- DDEV and mittwald hosting project
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except the AI plugin.
Please confirm which theme type you used for testing.
Description
Instead of setting the API_KEY for the provider using the GUI and a database option, one can also set the
envvalue or a constant inwp-config.php:This works well, the connectors screen shows this information and displays the provider as connected, all AI requests succeed, the models can fetched, and so on.
In Settings › AI, where you can activate the experiments, the experiments can be activated and with the new Developer mode model controls form 0.9.0 the models can be selected.
The problem is, that the following error is still displayed on the top of the page:
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except the AI plugin.
Please confirm which theme type you used for testing.