WordPress / WordPress/php-ai-client
Support for AWS Bedrock (via Converse API)
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 308
- Forks
- 84
- Avg merge
- 7d 21h
- Merged PRs (30d)
- 2
Description
Description
This issue proposes adding a new provider for AWS Bedrock. As an enterprise-grade service, Bedrock provides a unified gateway to multiple foundation models (Anthropic Claude, Meta Llama, Mistral, etc.).
For many enterprise WordPress users, direct connections to individual model providers are blocked by corporate security policies. Supporting Bedrock allows these organizations to use the php-ai-client while adhering to strict compliance, data residency, and security standards within their existing AWS infrastructure.
Motivation
- Enterprise Adoption: Enables the use of this library in environments where AWS is the only approved AI provider.
- Model Abstraction: A single implementation of Bedrock's Converse API grants access to dozens of leading foundation models.
- Lightweight Integration: By utilizing Bedrock's recently released API Key authentication, we can avoid the heavy dependency of the full AWS PHP SDK and the complexity of SigV4 signing.
Proposed Implementation
The implementation (to be provided in a supporting PR) includes:
- Provider: AwsBedrockProvider implementing the core provider interface.
- Authentication: Support for Authorization: Bearer {API_KEY}.
- Feature Parity:
- Converse API: Full mapping for text-based chat.
- Vision: Multi-modal support for image inputs via MessagePart.
- Tool Calling: Mapping FunctionDeclaration to Bedrock’s toolConfig.
- Usage Tracking: Precise extraction of prompt, completion, and total tokens from response metadata.
- Flexible Configuration: Supports region-specific runtime endpoints and cross-region inference profile IDs.
Proposed Environment Variables
AWS_BEDROCK_API_KEY: Required for authentication.
AWS_BEDROCK_REGION: The target AWS region.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the core provider interface and the AWS Bedrock Converse API requirements. Define the scope around AwsBedrockProvider, bearer-key authentication, text and image messages, tool calling, usage tracking, regional endpoints, and the two proposed environment variables. Done means these proposed capabilities are supported consistently by the client.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, php
- Domain
- api, backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100