andrecorugda/ai-openrouter-gateway
A Laravel package that integrates the OpenRouter AI gateway, giving PHP applications a simple, unified way to send prompts and manage models, API keys, and responses through OpenRouter's multi-model API.
The package is a Filament integration for an AI gateway: it gives you a unified AI endpoint plus a generated API reference. v1.3.2 is a small feature release in the Filament 3 line (^1.3); if you are on Filament 4/5 you need ^2.0 instead — do not mix the constraints.
Minimal setup:
composer require <vendor>/ai-gateway:^1.3.config/ai-gateway.php) and set your provider credentials / gateway options via env.{prefix}/docs for the standalone Scalar reference, or open the "API docs" page in the panel.Where to look first: the api.docs block in config/ai-gateway.php (prefix, middleware, and now dark_mode), then the generated /docs route. The first real use case is turning the gateway into something your frontend/mobile team can consume: they read /docs, you keep the config as the contract.
ai-gateway.api.docs.dark_mode / AI_GATEWAY_API_DOCS_DARK, default true. Set AI_GATEWAY_API_DOCS_DARK=false in .env when you want the light Scalar theme, e.g. to match a light Filament admin panel. Since it is a normal config value, it can differ per environment (true locally, false in production, or vice versa).^1.3 explicitly on Filament 3 projects and document the ^2.0 line for Filament 4/5 in your upgrade notes. Composer will happily resolve the wrong major if your Filament constraint is loose./{prefix}/docs in CI or a post-deploy check to catch route-prefix regressions, missing config, or middleware changes before consumers notice.AI_GATEWAY_API_DOCS_DARK=false to avoid a dark docs iframe inside a light admin.AI_GATEWAY_API_DOCS_DARK must be present when php artisan config:cache runs. After changing it, run php artisan config:clear (or rebuild the cache) or the old value persists.php artisan route:cache); stale cached routes are a common "why is /docs 404?" cause.X-Frame-Options / frame-ancestors. Same-origin defaults usually work; custom domains and proxies are where it breaks.^1.3 line.How can I help you explore Laravel packages today?