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(4mo ago)10MITPHPPHP ^8.3

Since Mar 1Pushed 4mo 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 today

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

32

—

LowBetter than 69% of packages

Maintenance77

Regular maintenance activity

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity39

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

126d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/90193594?v=4)[Vaibhav Jethava](/maintainers/vaibhavjethva)[@vaibhavjethva](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M377](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M137](/packages/illuminate-cookie)[webcrafts-studio/lens-for-laravel

A local-first WCAG accessibility auditor for Laravel with axe-core, source mapping, CI workflows, and optional AI fixes.

372.5k](/packages/webcrafts-studio-lens-for-laravel)

PHPackages © 2026

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