[wp-trac] [WordPress Trac] #64873: WP AI Client: Add JavaScript client (`wp-ai-client`)

WordPress Trac noreply at wordpress.org
Wed Apr 29 12:07:47 UTC 2026


#64873: WP AI Client: Add JavaScript client (`wp-ai-client`)
---------------------------------------------+-------------------------
 Reporter:  gziolo                           |       Owner:  (none)
     Type:  enhancement                      |      Status:  new
 Priority:  normal                           |   Milestone:  7.1
Component:  AI                               |     Version:  trunk
 Severity:  normal                           |  Resolution:
 Keywords:  ai-client has-patch 2nd-opinion  |     Focuses:  javascript
---------------------------------------------+-------------------------

Comment (by mikinc860):

 After reviewing both #64872 and #64873, the separation between the REST
 layer and the JavaScript client seems like the right approach and should
 help keep the architecture easier to evolve over time.

 One thing that may help while landing `wp-ai-client` into Core is defining
 a stable normalization layer between the package and the `wp-ai/v1`
 responses. That would allow the REST implementation in #64872 to evolve
 internally without creating breaking changes for Gutenberg or third-party
 consumers relying on the JS package.

 A few additional considerations that may improve long-term
 maintainability:

 * middleware/interceptor support similar to `apiFetch`,
 * first-class TypeScript typings,
 * transport-agnostic internals for future streaming support,
 * and maintaining consistent request/response structures with the PHP
 client where practical.

 Since this package will likely become the primary integration point for
 editor/admin AI experiences, having a predictable abstraction layer early
 should help future Core and plugin integrations.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64873#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list