-
Notifications
You must be signed in to change notification settings - Fork 28
Milestone
Description
Description
Connect the AI Experiments plugin with the WP AI Client SDK (and its underlying PHP AI Client SDK) to establish a unified service layer that experimental features can use to communicate with AI providers. This integration will form the foundation for running AI-powered tasks, managing provider configuration, and handling fallbacks when no provider is available.
Goals
- Add the WP AI Client SDK as a Composer dependency.
- Initialize a dedicated service class (for example,
AI_Connection_Manager) to manage provider configuration and requests through the WP AI Client SDK. - Expose a consistent interface for experimental features to register, request, and run AI tasks using the SDK.
- Include simple detection and handling for available providers, supporting both user-configured and pre-configured setups.
- Provide hooks and filters for developers or hosts to override configuration behavior.
- Add inline documentation and example usage demonstrating how features interact with the connection layer.
Design Considerations
- Integration should remain centralized so that each feature module can use the SDK through a shared connection layer rather than duplicating logic.
- Maintain alignment with the plugin’s encapsulation principles: each feature should be able to depend on the connection service without introducing tight coupling.
- Use dependency injection and clean class structure to ensure the system is testable, extendable, and maintainable.
Acceptance Criteria
- WP AI Client SDK initializes successfully and can complete a basic test request when a provider is configured.
- Plugin detects and handles the absence of a configured provider gracefully.
- Feature modules can call the service to perform AI tasks using a standard method (for example,
AI_Service::run_text_task()). - Integration is documented and passes WordPress coding standards.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In progress