adachsoft / ai-integration-moonshot
Moonshot provider for adachsoft/ai-integration tool-calling API
Package info
gitlab.com/a.adach/ai-integration-moonshot
pkg:composer/adachsoft/ai-integration-moonshot
v1.0.1
2026-05-14 09:18 UTC
Requires
- php: ^8.3
- adachsoft/ai-integration: ^0.7
Requires (Dev)
- adachsoft/php-code-style: ^0.5
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^13.0
- rector/rector: ^2.3
- symplify/phpstan-rules: ^14.9
- vlucas/phpdotenv: ^5.6
README
Moonshot provider for adachsoft/ai-integration tool-calling API.
Installation
composer require adachsoft/ai-integration-moonshot
Usage
use AdachSoft\AiIntegration\PublicApi\Builder\ToolCallingChatFacadeBuilder;
use AdachSoft\AiIntegrationMoonshot\MoonshotProvider;
$builder = ToolCallingChatFacadeBuilder::create();
MoonshotProvider::register($builder, getenv('MOONSHOT_API_KEY'));
$facade = $builder->build();
// Use $facade with your ToolCallingChatRequest DTO where you select the model id.
Production tests
Production tests use environment variables loaded from system env and .env files via vlucas/phpdotenv.
Environment variables:
MOONSHOT_API_KEY- required Moonshot API key.MOONSHOT_MODEL- optional non-thinking model override (default:moonshot-v1-8k).MOONSHOT_THINKING_MODEL- optional thinking model override (default:kimi-k2-thinking).
Run production tests:
vendor/bin/phpunit --group production tests/Production
For thinking models, pass reasoning_content from the previous assistant response using metadata['reasoning_content'] when building the next assistant message. The library forwards this value in payload messages and does not persist conversation history by itself.