Search by

pushery / sovereign-ai-for-laravel

pushery

IONOS AI Model Hub, OVHcloud AI Endpoints and Melious as providers for the Laravel AI SDK, held to endpoints in the EU, with a model catalog and token usage.

v0.2.0 2026-12-01 10:53 UTC

This package is auto-updated.

Last update: 2026-12-01 10:53:26 UTC


README

Sovereign AI for Laravel

Sovereign AI for Laravel

Latest Version PHP Version Laravel Versions License

Tests: Pest 5 Coverage: 100% Type coverage: 100% PHPStan: level 10 Code style: Pint

IONOS AI Model Hub, OVHcloud AI Endpoints and Melious as providers for the Laravel AI SDK, held to endpoints in the EU, with a model catalog and token usage.

Documentation

Full documentation at docs.pushery.com/sovereign-ai-for-laravel. This README is the quick start; the guides and the configuration reference live there.

Requirements

  • PHP 8.4+ (tested on 8.4.27, 8.5.x and 8.6.x)
  • Laravel 13+
  • laravel/ai 1.4+, installed with the package

The package keeps no table and needs no database. Its suite still runs on PostgreSQL 18.7 and MySQL 8.4.13 beside SQLite.

Tested on the floor of the declared PHP range, because a >= promise is only proven by running on the boundary, and on the minor version above it, so the range above the floor is exercised here rather than first by a consumer.

Installation

composer require pushery/sovereign-ai-for-laravel

The service provider is registered automatically through package discovery. Put the keys of the clouds you use into .env:

SOVEREIGN_AI_IONOS_KEY=
SOVEREIGN_AI_OVHCLOUD_KEY=
SOVEREIGN_AI_MELIOUS_KEY=

Configuration

Publish the configuration file:

php artisan vendor:publish --tag=sovereign-ai-config

This writes config/sovereign-ai.php, where every option is documented inline: which clouds are registered, the endpoint and the default models of each, and models to add to the catalog. The package ships no migrations, routes or views.

Usage

The package registers three providers of the Laravel AI SDK, ionos (IONOS AI Model Hub), ovhcloud (OVHcloud AI Endpoints) and melious (Melious). Every agent can use them:

use function Laravel\Ai\agent;

$response = agent('You answer in one sentence.')->prompt('What is the capital of France?', provider: 'ionos');

$response->text;
$response->usage->inputTokens;

Each request goes only to an endpoint the package lists for its cloud, https://openai.inference.de-txl.ionos.com/v1, https://oai.endpoints.kepler.ai.cloud.ovh.net/v1 and https://api.melious.ai/v1; any other URL stops the boot. A request with a JSON schema, tools or embeddings is refused before it is sent when the catalog does not list that capability for its model, and an error from a cloud names the provider and the cause. The documentation covers the model catalog, the errors, the token usage, the configuration, and what the clouds state about data processing and training.

Melious names its models only to a request with a key, so no model of Melious ships: set SOVEREIGN_AI_MELIOUS_MODEL and SOVEREIGN_AI_MELIOUS_EMBEDDINGS_MODEL to models of the account, and list a model with its capabilities under sovereign-ai.melious.catalog before you ask it for structured output, tools or embeddings. A request that switches on a tool of the Melious platform, such as web-search, is refused before it is sent.

Google Cloud, through Gemini Enterprise Agent Platform, is a fourth provider, google, for an application that adds it to sovereign-ai.providers.register with a project, a location in the European Union and the key file of a service account. Its requests go only to Google's endpoints in the Union, and a model at a location where Google does not keep its processing there is refused before anything is sent.

Testing

The test suite is not part of the published package: the tests and their PHPUnit configuration stay in the development repository, so a clone of this repository has no composer test. CONTRIBUTING.md says how a change is tested on its way in.

Security

Please review the security policy and report vulnerabilities privately rather than opening a public issue.

Built by PUSHERY

This package is built and maintained by PUSHERY — a Berlin-based studio building Laravel applications, SaaS products, and open-source tools.

Building a Laravel UI? WireKit is PUSHERY's open-source Livewire component kit. Browse the rest of our work at pushery.com.

License

The MIT License (MIT). See LICENSE for details.