adachsoft/ai-integration-moonshot

Moonshot provider for adachsoft/ai-integration tool-calling API

Maintainers

Package info

gitlab.com/a.adach/ai-integration-moonshot

Issues

pkg:composer/adachsoft/ai-integration-moonshot

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.1 2026-05-14 09:18 UTC

This package is auto-updated.

Last update: 2026-05-14 10:17:41 UTC


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.