PHPackages                             vaibhavjethva/laravel-ai-health - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vaibhavjethva/laravel-ai-health

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vaibhavjethva/laravel-ai-health
===============================

Health checks for Laravel AI providers via ai:health Artisan command.

v0.1.0(2mo ago)10MITPHPPHP ^8.3

Since Mar 1Pushed 2mo agoCompare

[ Source](https://github.com/vaibhavjethva/laravel-ai-health)[ Packagist](https://packagist.org/packages/vaibhavjethva/laravel-ai-health)[ RSS](/packages/vaibhavjethva-laravel-ai-health/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel AI Health
=================

[](#laravel-ai-health)

Provider health checks for `laravel/ai`.

What This Package Does
----------------------

[](#what-this-package-does)

This package adds an Artisan command:

```
php artisan ai:health
```

It checks each configured AI provider and reports:

- whether provider config exists
- whether API key is present
- whether a basic request succeeds
- request latency
- optional streaming check

Installation
------------

[](#installation)

Install as a normal runtime dependency:

```
composer require vaibhavjethva/laravel-ai-health
```

### `require` vs `require-dev`

[](#require-vs-require-dev)

- Use `require` (recommended): if you will run `ai:health` in CI, staging, or production checks.
- Use `require-dev`: only if you want local-only usage and do not need this command outside development.

```
composer require --dev vaibhavjethva/laravel-ai-health
```

This package uses Laravel package auto-discovery, so no manual service provider registration is required.

Usage
-----

[](#usage)

Check all configured providers in `config/ai.php`:

```
php artisan ai:health
```

Check only selected providers:

```
php artisan ai:health --provider=openai --json
php artisan ai:health --provider=openai --provider=groq
```

Also test streaming:

```
php artisan ai:health --stream
```

Fail CI when any provider is unhealthy/degraded/healthy:

```
php artisan ai:health --fail-on=unhealthy
php artisan ai:health --fail-on=degraded
php artisan ai:health --fail-on=healthy
```

### Typical Output Meaning

[](#typical-output-meaning)

- `HEALTHY`: request succeeded
- `DEGRADED`: base request works but streaming check failed
- `UNHEALTHY`: config/key/request failed

Options
-------

[](#options)

- `--provider=*`Check one or more specific configured providers by config key name. Example: `--provider=openai --provider=groq`
- `--stream`Also perform a streaming request test.
- `--json`Output machine-readable JSON.
- `--fail-on=healthy|degraded|unhealthy`Exit with code `1` if any checked provider matches the selected status. Default behavior is equivalent to `--fail-on=unhealthy`.

Exit Codes
----------

[](#exit-codes)

- `0`: no failure condition matched.
- `1`: at least one provider matched the selected failure condition.

Requirements
------------

[](#requirements)

- PHP `^8.3`
- `laravel/ai` `^0.2|0.x-dev`
- `illuminate/support` `^11.0|^12.0`

Notes
-----

[](#notes)

- Providers are read from `config('ai.providers')`.
- Missing API key is treated as `unhealthy` for providers that require keys.
- `ollama` can be checked without an API key.

Troubleshooting
---------------

[](#troubleshooting)

- Command not found: run `php artisan package:discover` and try again.
- All providers show `API key is missing`: set provider keys in `.env` and verify `config/ai.php` mappings.
- Local development with a path repository: run `composer update vaibhavjethva/laravel-ai-health -W`.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance86

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

73d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34d705a95954dbd8182515308ae0ca14682a04fd9da0eadd8f7df677cc3c893d?d=identicon)[vaibhavjethva](/maintainers/vaibhavjethva)

### Embed Badge

![Health badge](/badges/vaibhavjethva-laravel-ai-health/health.svg)

```
[![Health](https://phpackages.com/badges/vaibhavjethva-laravel-ai-health/health.svg)](https://phpackages.com/packages/vaibhavjethva-laravel-ai-health)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[mrmarchone/laravel-auto-crud

Laravel Auto CRUD helps you streamline development and save time.

28711.8k2](/packages/mrmarchone-laravel-auto-crud)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
