aisdk/xiaomi

Official Xiaomi provider for the PHP AI SDK.

Maintainers

Package info

github.com/phpaisdk/xiaomi

pkg:composer/aisdk/xiaomi

Transparency log

Fund package maintenance!

Open Collective

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.8.1 2026-07-22 06:27 UTC

This package is auto-updated.

Last update: 2026-07-22 06:27:45 UTC


README

GitHub Workflow Status Latest Version License

Official Xiaomi provider for the PHP AI SDK. Uses Xiaomi MiMo's OpenAI-compatible API.

Installation

composer require aisdk/xiaomi

Basic Usage

use AiSdk\Generate;
use AiSdk\Xiaomi;

Xiaomi::create(['apiKey' => $_ENV['XIAOMI_API_KEY']]);

$result = Generate::text('Explain this code briefly.')
    ->model(Xiaomi::model('mimo-v2.5'))
    ->run();

Configuration

Environment Variables

Variable Description Default
XIAOMI_API_KEY API key for authentication Required
XIAOMI_BASE_URL Base URL for API requests https://api.xiaomimimo.com/v1

Programmatic Configuration

Xiaomi::create([
    'apiKey' => $_ENV['XIAOMI_API_KEY'],
    'baseUrl' => 'https://api.xiaomimimo.com/v1',
]);

Supported Capabilities

Capability Support
Text generation and streaming Native OpenAI-compatible chat
Tool calling, structured output, reasoning Passed through for supported models
Image input Passed through for compatible vision models

Provider Options

Use providerOptions('xiaomi', ['raw' => [...]]) for documented MiMo chat-completions fields outside the portable SDK surface. Model IDs are opaque strings and are validated by Xiaomi.

Documentation