PHPackages                             mralaminahamed/ai-provider-for-minimax - 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. mralaminahamed/ai-provider-for-minimax

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

mralaminahamed/ai-provider-for-minimax
======================================

AI Provider for MiniMax — an independent MiniMax integration for the WordPress AI Client.

1.0.0(2mo ago)01GPL-2.0-or-laterPHPPHP &gt;=7.4CI passing

Since May 11Pushed 1mo agoCompare

[ Source](https://github.com/mralaminahamed/ai-provider-for-minimax)[ Packagist](https://packagist.org/packages/mralaminahamed/ai-provider-for-minimax)[ Fund](https://alaminahamed.com/donate)[ RSS](/packages/mralaminahamed-ai-provider-for-minimax/feed)WikiDiscussions trunk Synced 3w ago

READMEChangelog (7)Dependencies (10)Versions (2)Used By (0)

AI Provider for MiniMax
=======================

[](#ai-provider-for-minimax)

An independent, third-party MiniMax provider for the [WordPress PHP AI Client](https://github.com/WordPress/php-ai-client) SDK. Works as both a Composer package and a WordPress plugin. Not affiliated with, endorsed by, or sponsored by MiniMax.

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

[](#requirements)

- PHP 7.4 or higher
- WordPress 7.0 or higher (AI Client SDK is included in WordPress core)
    - On older WordPress releases, the [WordPress AI Client](https://wordpress.org/plugins/wp-ai-client/) plugin must be installed separately

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

[](#installation)

### As a WordPress Plugin

[](#as-a-wordpress-plugin)

1. Download the plugin zip
2. Go to **Plugins &gt; Add New &gt; Upload Plugin** in your WordPress admin
3. Upload and activate

### As a Composer Package

[](#as-a-composer-package)

```
composer require mralaminahamed/ai-provider-for-minimax
```

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

[](#configuration)

### WordPress Admin

[](#wordpress-admin)

Go to **Settings &gt; MiniMax** to configure:

SettingDescriptionDefaultAPI KeyYour MiniMax API key—Default ModelModel used when none is specifiedFirst availableTemperatureOutput randomness (0.0–2.0)1.0Max TokensMaximum response length2048Top PNucleus sampling threshold (0.0–1.0)1.0Presence PenaltyPenalise repeated topics (-2.0–2.0)0.0Frequency PenaltyPenalise repeated tokens (-2.0–2.0)0.0### Environment Variable

[](#environment-variable)

`MINIMAX_API_KEY` takes priority over the database setting:

```
export MINIMAX_API_KEY=your-api-key
```

Get your API key at [platform.minimax.io/user-center/basic-information/interface-key](https://platform.minimax.io/user-center/basic-information/interface-key).

Usage
-----

[](#usage)

### With WordPress (automatic)

[](#with-wordpress-automatic)

The provider registers itself on the `init` hook. No manual setup required beyond entering your API key.

```
use WordPress\AiClient\AiClient;

$result = AiClient::prompt('Explain quantum computing')
    ->usingProvider('minimax')
    ->generateTextResult();

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

### As a Standalone Composer Package

[](#as-a-standalone-composer-package)

```
use WordPress\AiClient\AiClient;
use AlAminAhamed\MiniMaxAiProvider\Provider\MiniMaxProvider;

$registry = AiClient::defaultRegistry();
$registry->registerProvider(MiniMaxProvider::class);

putenv('MINIMAX_API_KEY=your-api-key');

$result = AiClient::prompt('Explain quantum computing')
    ->usingProvider('minimax')
    ->generateTextResult();

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

Supported Models
----------------

[](#supported-models)

Models are discovered dynamically from the MiniMax API (cached for 1 hour). The fallback list includes 9 models:

- MiniMax-M2.7, MiniMax-M2.7 Highspeed
- MiniMax-M2.5, MiniMax-M2.5 Highspeed
- MiniMax-M2.1, MiniMax-M2.1 Highspeed
- MiniMax-M2
- MiniMax-M1
- MiniMax-Text-01

Architecture
------------

[](#architecture)

```
includes/
  Provider/
    MiniMaxProvider.php              # Registers provider ID "minimax", base URL https://api.minimax.io/v1
    MiniMaxTextGenerationModel.php   # OpenAI-compatible text generation
  Metadata/
    MiniMaxModelMetadataDirectory.php  # API model discovery + transient cache
  Settings/
    MiniMaxSettings.php              # WP admin settings page (logic only)
templates/
  admin/
    settings-page.php                #  wrapper
    section-general.php              # Section description
    field-model.php                  # Model
    field-temperature.php            # Temperature
    field-max-tokens.php             # Max tokens
    field-top-p.php                  # Top P
    field-presence-penalty.php       # Presence penalty
    field-frequency-penalty.php      # Frequency penalty

```

Settings page: `options-general.php?page=minimax-settings`Option key: `minimax_settings`

Development
-----------

[](#development)

```
# Install dependencies
composer install

# Run tests
composer test

# Lint
composer phpcs

# Auto-fix lint issues
composer phpcbf

# Static analysis
composer phpstan

# Build release zip
composer release
```

The release script runs `composer install --no-dev --optimize-autoloader` so only the plugin's own classmap is in the vendor directory — the AI Client SDK is excluded entirely (it is provided by WordPress 7.0+ at runtime).

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance89

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

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

75d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34349365?v=4)[Al Amin Ahamed](/maintainers/mralaminahamed)[@mralaminahamed](https://github.com/mralaminahamed)

---

Top Contributors

[![mralaminahamed](https://avatars.githubusercontent.com/u/34349365?v=4)](https://github.com/mralaminahamed "mralaminahamed (72 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mralaminahamed-ai-provider-for-minimax/health.svg)

```
[![Health](https://phpackages.com/badges/mralaminahamed-ai-provider-for-minimax/health.svg)](https://phpackages.com/packages/mralaminahamed-ai-provider-for-minimax)
```

###  Alternatives

[assada/laravel-achievements

Achievements for Laravel 6+

78172.6k](/packages/assada-laravel-achievements)[atlas-php/atlas

A unified AI SDK for Laravel applications.

5345.4k](/packages/atlas-php-atlas)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

197.8k19](/packages/wsmallnews-filament-nestedset)

PHPackages © 2026

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