The Wire · Showcase
LARAVEL AI FIXES QUEUE WORKER DRIVER EXTENSIONS
By RepoJournal · Filed · About Laravel
Long-running queue workers just lost custom AI drivers between jobs—a fix landed overnight.
AiManager was bound as scoped, which meant every time Horizon or queue:work processed a new job, Laravel would discard the manager instance and lose any driver extensions that packages registered at boot [1]. This created a cascade failure: the next job would resolve a fresh AiManager with an empty customCreators registry, then immediately throw "Instance driver not supported" when trying to load an extended driver [2]. The fix rebinds AiManager as a singleton, preserving custom driver registrations across the entire queue worker lifecycle. If you're running third-party AI drivers (like Anthropic, OpenAI packages) with long-running workers, this was breaking your queue jobs silently until you hit that specific driver call.
One email a day. Unsubscribe in one click.
Keep up with Laravel in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Update laravel/ai and verify custom drivers work in queue:work daemon laravel/ai [immediate]
- → Check Horizon logs for 'not supported' driver errors if you're already on latest laravel/horizon [plan]
References
- [1] Bind AiManager as singleton to preserve driver extensions across jobs (#411) laravel/ai
- [2] Bind AiManager as singleton to preserve driver extensions across jobs ↗ laravel/ai