Supported
| Capability | Supported | Notes |
|---|---|---|
| Text generation | Yes | Any Workers AI chat model. |
| Streaming | Yes | Text and reasoning events. |
| Tool calls | Yes | Model must support tools. See Tools. |
| Sub-agents and MCP tools | Yes | Mapped as tools. |
| Structured output | Yes | json_schema response format, with optional #[Strict] and re-ask. |
| Embeddings | Yes | Any Workers AI embedding model. |
| Reranking | Yes | Reranking::of() and Collection::rerank(). See Reranking. |
| Image generation | Yes | Image::of(), with reference images on FLUX.2. See Image generation. |
| Speech | Yes | Audio::of(). See Speech and transcription. |
| Transcription | Yes | Transcription::of(), with speaker labels on nova-3, which cannot use a gateway. See Speech and transcription. |
| Document attachments | Opt-in | Converted to Markdown with convert_documents, or call Markdown::of(). See Documents. |
| Web search | Yes | With the CloudflareWebSearch tool. See Web search. |
| Image input | Yes | JPEG, PNG, GIF and WebP for uploaded files. See Image input. |
| Reasoning text | Yes | Read from reasoning_content, reasoning or thinking. |
reasoning_effort |
Yes | low, medium, high. |
| AI Gateway | Yes | /compat by default. Authenticated Gateway supported. See AI Gateway. |
| Failover | Yes | For transient failures. See Errors and retries. |
| Neuron figures | Yes | By event, on every model call. See Cost tracking. |
| Classification (Clef) | Yes | laravel/ai 1.0 or later. Str::decide and Collection::decide work. Fake with Classification::fake(). See Clef. |
| Extraction (Clairic) | Yes | Extraction::of(), not part of laravel/ai. Has Extraction::fake(), the Extracting, Extracted and ExtractionFailed events, and failover. See Clairic. |
Not supported
| Capability | Behavior |
|---|---|
Document attachments, with convert_documents off |
Throws InvalidArgumentException. |
| Audio or video attachments on chat | Throws InvalidArgumentException. Use Transcription for speech. clef-omni reads them through provider options. See Clef. |
Laravel AI provider tools, such as WebSearch |
On laravel/ai 1.1 and later, Laravel AI removes them before the call, with no error. On 0.9 to 1.0, throws RuntimeException. For web search, see Web search. |
#[CacheInstructions] |
Has no effect. Use session_affinity. See Session affinity. |
| Laravel AI files and stores | Not implemented. Cloudflare’s AI Search has no confirmed match for this API. |
| Request concurrency limits | Not provided. Limit the fan-out in your app. |
Models
The package does not keep a list of models. You give the model name, and Cloudflare decides if it exists and if your account can use it. See Models for the package defaults and for test notes.
Laravel AI versions
laravel/ai |
Package version | Notes |
|---|---|---|
^0.7, ^0.8 |
^0.5 |
|
0.9 to 0.11 |
^1.0 |
Usage::$promptTokens excludes cached tokens. |
1.0 to 1.3 |
^1.0 |
TextUsage::$inputTokens includes cached tokens. |
Package ^1.0 supports laravel/ai ^0.9 || ^0.10 || ^0.11 || ^1.0 in one codebase. The tests ran on v0.9.1, v0.10.3, v0.11.2, v1.0.0 and v1.3.0. See Cost tracking for the token count difference.
These features depend on the laravel/ai version:
| Feature | Needs |
|---|---|
StepResponse::$raw ($response->raw) |
A laravel/ai version after 0.9. |
ProviderConnectionException on timeout |
laravel/ai 0.11 or later. |
StreamErrorException on stream error |
laravel/ai 0.11 or later. |
StepResponse::$reasoning |
laravel/ai 1.x. |
Provider::withHeaders() per-call headers |
laravel/ai 1.x. |
Clef (Classification, Str::decide, Collection::decide) |
laravel/ai 1.0 or later. |
| Clef image attachments | laravel/ai 1.2 or later. |
Clairic (Extraction) |
Every supported version. |
Collection::rerank(), Image, Audio, Transcription, Reranking |
Every supported version. |