mralaminahamed/ai-provider-for-minimax
Composer 安装命令:
composer require mralaminahamed/ai-provider-for-minimax
包简介
AI Provider for MiniMax — an independent MiniMax integration for the WordPress AI Client.
README 文档
README
An independent, third-party MiniMax provider for the 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
- 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 plugin must be installed separately
Installation
As a WordPress Plugin
- Download the plugin zip
- Go to Plugins > Add New > Upload Plugin in your WordPress admin
- Upload and activate
As a Composer Package
composer require mralaminahamed/ai-provider-for-minimax
Configuration
WordPress Admin
Go to Settings > MiniMax to configure:
| Setting | Description | Default |
|---|---|---|
| API Key | Your MiniMax API key | — |
| Default Model | Model used when none is specified | First available |
| Temperature | Output randomness (0.0–2.0) | 1.0 |
| Max Tokens | Maximum response length | 2048 |
| Top P | Nucleus sampling threshold (0.0–1.0) | 1.0 |
| Presence Penalty | Penalise repeated topics (-2.0–2.0) | 0.0 |
| Frequency Penalty | Penalise repeated tokens (-2.0–2.0) | 0.0 |
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.
Usage
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
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
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
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 # <form> wrapper
section-general.php # Section description
field-model.php # Model <select>
field-temperature.php # Temperature <input>
field-max-tokens.php # Max tokens <input>
field-top-p.php # Top P <input>
field-presence-penalty.php # Presence penalty <input>
field-frequency-penalty.php # Frequency penalty <input>
Settings page: options-general.php?page=minimax-settings
Option key: minimax_settings
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
GPL-2.0-or-later
mralaminahamed/ai-provider-for-minimax 适用场景与选型建议
mralaminahamed/ai-provider-for-minimax 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mralaminahamed/ai-provider-for-minimax 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mralaminahamed/ai-provider-for-minimax 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 50
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-05-11