Support WordPress 7.0 core AI client integration#249
Support WordPress 7.0 core AI client integration#249Jameswlepage wants to merge 3 commits intoWordPress:developfrom
Conversation
| "wordpress/wp-ai-client": "^0.3.0", | ||
| "wordpress/anthropic-ai-provider": "^1.0", | ||
| "wordpress/google-ai-provider": "^1.0", | ||
| "wordpress/openai-ai-provider": "^1.0" |
There was a problem hiding this comment.
I don't think we should depend on any of these anymore?
Need to require WordPress >= 7.0-beta, and then it'll just work. For the providers, we could add a nag to install them, although very soon this will be in Core anyway.
| * @param mixed $prompt Optional initial prompt content. | ||
| * @return mixed Prompt builder instance. | ||
| */ | ||
| function ai_client_prompt_with_wp_error( $prompt = null ) { |
There was a problem hiding this comment.
Why don't we go all in on requiring WP 7.0 instead? I think it makes sense. It'll mean users on production sites won't be able to update, but that's not really the objective at this point IMO. Going all in on 7.0 will makes this much simpler and prepare us for the future state we want this to be in. And once 7.0 stable is out, any site using an older version of this plugin already will be able to just update.
There was a problem hiding this comment.
Seconded. Was aiming to get this to be "testable" for the current beta.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #249 +/- ##
=============================================
- Coverage 56.69% 52.73% -3.97%
- Complexity 505 513 +8
=============================================
Files 32 32
Lines 2568 2890 +322
=============================================
+ Hits 1456 1524 +68
- Misses 1112 1366 +254
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:
|
|
Closing in favor of #242. |
|
Confirming that everyone active here is already listed for props to come in #242 in #242 (comment). |
Summary
This PR prepares the plugin for the WordPress 7.0 transition where the AI client is bundled in core.
What changed
Why
WordPress 7.0 includes the AI client foundation but may not expose a credential settings UI in all builds. This keeps AI Experiments functional and fail-soft across 6.9 and 7.0 while improving forward compatibility.
Related
Testing