Migrate credentials from the AI Credentials setup to the new Connectors setup#286
Conversation
…old AI Credentials approach to the new Connectors approach
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #286 +/- ##
=============================================
+ Coverage 57.72% 58.01% +0.29%
- Complexity 567 576 +9
=============================================
Files 36 37 +1
Lines 2933 2956 +23
=============================================
+ Hits 1693 1715 +22
- Misses 1240 1241 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Testing results.... Here's the AI Credentials screen on WP 7.0-beta3 and AIEx v0.4.1 before applying this PR: Here's the same screen after applying this PR: Here's the same screen after clicking Here's the Connectors screen after applying this PR and clicking And here's the Connectors screen after installing the OAI provider plugin: Some thoughts...
|
|
@jeffpaul Looking at those screenshots, I think you might have missed a step in testing here. That AI Credentials screen came from the old WP AI Client. That screen will no longer exist going forward for anyone running the latest version of this plugin (which those changes are also in this branch). So if you're seeing that screen, I think you're still running v0.4.1 instead of this branch. It's tricky here to test as you need to follow these steps:
In regards to your questions:
As mentioned above, this screen no longer exists so nothing to add or change here.
Just tested again and this did work for me, both in scenarios where an AI Provider plugin was already installed and active and when the plugin wasn't active / installed but was activated / installed as part of the Connectors flow. I think it's not working for you due to the above note around ensuring you're testing with this branch. |
jeffpaul
left a comment
There was a problem hiding this comment.
Ok, ran through things again and can't seem to get to the AI Credentials screen with that Save Changes button and things work as expected.
Nice touch updating the Credentials row action from the Plugins list to Connectors!





What?
Partially closes #244
Migrates credentials to the new Connectors format
Why?
When using the bundled WP AI Client, credentials were stored under a single option and used on the AI Credentials screen. With the version of the AI Client that is in WP 7.0, there's a new Connectors setting screen and it stores credentials under separate options. We want to ensure existing users don't those their credentials so we migrate those over.
How?
Use of AI Tools
Used Claude Code running Sonnet 4.6 to plan the migration approach and write most of the code (including tests). Fixed a few issues myself after manual testing
Testing Instructions
Settings > AI Credentialswp_ai_client_provider_credentialsoption no longer existsconnectors_ai_anthropic_api_key,connectors_ai_google_api_key, andconnectors_ai_openai_api_keySettings > Connectorsscreen