PHPackages                             aysnc/wordpress-php-ai-client-bedrock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aysnc/wordpress-php-ai-client-bedrock

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aysnc/wordpress-php-ai-client-bedrock
=====================================

AWS Bedrock provider for the WordPress PHP AI Client SDK.

0.1.0(3mo ago)2661MITPHPPHP ^8.3CI passing

Since Jan 31Pushed 3mo agoCompare

[ Source](https://github.com/Aysnc-Labs/wordpress-php-ai-client-bedrock)[ Packagist](https://packagist.org/packages/aysnc/wordpress-php-ai-client-bedrock)[ RSS](/packages/aysnc-wordpress-php-ai-client-bedrock/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (1)

PHP AI Client AWS Bedrock Provider
==================================

[](#php-ai-client-aws-bedrock-provider)

[![GitHub Actions](https://github.com/Aysnc-Labs/wordpress-php-ai-client-bedrock/actions/workflows/test.yml/badge.svg)](https://github.com/Aysnc-Labs/wordpress-php-ai-client-bedrock/actions/workflows/test.yml/badge.svg)[![Maintenance](https://camo.githubusercontent.com/9f9520637e3eaf34c2a45cb16bd6adf93e17366bb9c706a7d20b003e653afbcd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4163746976656c792532304d61696e7461696e65642d7965732d677265656e2e737667)](https://camo.githubusercontent.com/9f9520637e3eaf34c2a45cb16bd6adf93e17366bb9c706a7d20b003e653afbcd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4163746976656c792532304d61696e7461696e65642d7965732d677265656e2e737667)

AWS Bedrock provider for the [WordPress PHP AI Client](https://github.com/WordPress/php-ai-client) SDK.

This package was [originally contributed](https://github.com/WordPress/php-ai-client/pull/181) to the core PHP AI Client repository. The WordPress team is [decoupling all providers](https://github.com/WordPress/php-ai-client/pull/181#issuecomment-2915891498) into standalone packages ahead of WordPress 7.0 core integration, so this provider is maintained here as an independent Composer library.

Requirements
------------

[](#requirements)

- PHP 8.3+
- [wordpress/php-ai-client](https://github.com/WordPress/php-ai-client) ^0.4

Installation
------------

[](#installation)

```
composer require aysnc/wordpress-php-ai-client-bedrock
```

Configuration
-------------

[](#configuration)

Set the following environment variables:

VariableRequiredDescription`AWS_BEDROCK_API_KEY`YesBearer token for Bedrock API authentication`AWS_BEDROCK_REGION`NoAWS region (defaults to `AWS_DEFAULT_REGION`, then `us-east-1`)`AWS_DEFAULT_REGION`NoFallback AWS regionUsage
-----

[](#usage)

### Register the Provider

[](#register-the-provider)

```
use WordPress\AiClient\AiClient;
use Aysnc\WordPress\PhpAiClientBedrock\AwsBedrockProvider;

AiClient::defaultRegistry()->registerProvider( AwsBedrockProvider::class );
```

### Generate Text

[](#generate-text)

```
$text = AiClient::prompt( 'Explain quantum computing in simple terms.' )
    ->usingModel( AwsBedrockProvider::model( 'anthropic.claude-3-5-sonnet-20241022-v2:0' ) )
    ->usingMaxTokens( 1000 )
    ->generateText();

echo $text;
```

### Full Result with Metadata

[](#full-result-with-metadata)

```
$result = AiClient::prompt( 'Explain quantum computing in simple terms.' )
    ->usingModel( AwsBedrockProvider::model( 'anthropic.claude-3-5-sonnet-20241022-v2:0' ) )
    ->usingMaxTokens( 1000 )
    ->generateTextResult();

echo $result->toText();
echo $result->getTokenUsage()->getTotalTokens();
```

### With Configuration

[](#with-configuration)

```
$result = AiClient::prompt( 'Hello' )
    ->usingModel( AwsBedrockProvider::model( 'anthropic.claude-3-5-sonnet-20241022-v2:0' ) )
    ->usingSystemInstruction( 'You are a helpful assistant.' )
    ->usingMaxTokens( 1000 )
    ->usingTemperature( 0.7 )
    ->generateTextResult();
```

### Custom Region

[](#custom-region)

Set the `AWS_BEDROCK_REGION` environment variable, or fall back to `AWS_DEFAULT_REGION`:

```
export AWS_BEDROCK_REGION="eu-west-1"
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance80

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

106d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/008ac380120a7d6edbc8e4a9d2fc2b4c3e0b43739ee2138edb255e29c9107cde?d=identicon)[aysnc](/maintainers/aysnc)

---

Top Contributors

[![junaidbhura](https://avatars.githubusercontent.com/u/2512525?v=4)](https://github.com/junaidbhura "junaidbhura (7 commits)")

---

Tags

aiaws-bedrockphpwordpress

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aysnc-wordpress-php-ai-client-bedrock/health.svg)

```
[![Health](https://phpackages.com/badges/aysnc-wordpress-php-ai-client-bedrock/health.svg)](https://phpackages.com/packages/aysnc-wordpress-php-ai-client-bedrock)
```

###  Alternatives

[kevinlebrun/slug.php

Slug helpers

4451.4k1](/packages/kevinlebrun-slugphp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
