The official Laravel AI SDK (laravel/ai) released v1.5.0 on 2 December 2026. The release notes are short, with just two items, but both are useful. There’s a new open-responses driver that talks to any server implementing the Open Responses spec. And there’s a laravel-cloud provider for the Laravel Cloud AI gateway.
For many teams, the Open Responses driver is the bigger deal. It lets you point Laravel’s agent() API at self-hosted or third-party servers such as vLLM, Ollama, LM Studio, Hugging Face or OpenRouter through their /responses endpoint. This guide shows how to set up both providers, with code based on the merged pull requests and the shipped config file.
Upgrade to 1.5
composer require laravel/ai:^1.5
If you published config/ai.php before, it won’t include the new provider entries. Copy them from the package’s config file (shown below) into your own config.
You can check the version with:
composer show laravel/ai | grep versions
What is Open Responses?
Open Responses is an open specification based on the shape of OpenAI’s Responses API. Laravel already had an openai-compatible driver for servers that offer the older Chat Completions endpoint. According to PR #1257, the new driver “mirrors openai-compatible for the /responses endpoint instead of Chat Completions.”
The PR lists three ways it differs from the openai driver:
- Stateless by default. It sends the full conversation history with
store: false, so it doesn’t depend on the server keeping responses. - The API key is optional. You can leave
keyempty for local servers without authentication. - No OpenAI-specific extras. OpenAI-only hosted tools and model heuristics are left out.
Step 1: Configure the open-responses provider
Add the server URL and key (if it needs one) to .env:
OPEN_RESPONSES_URL=http://localhost:8080/v1
OPEN_RESPONSES_API_KEY=
The v1.5.0 config/ai.php ships with this entry:
'open-responses' => [
'driver' => 'open-responses',
'url' => env('OPEN_RESPONSES_URL'),
'key' => env('OPEN_RESPONSES_API_KEY'),
],
Add a models block so you don’t have to pass a model on every call. The PR’s example looks like this:
'open-responses' => [
'driver' => 'open-responses',
'url' => env('OPEN_RESPONSES_URL'),
'key' => env('OPEN_RESPONSES_API_KEY'),
'models' => [
'text' => [
'default' => 'openai/gpt-oss-120b',
'cheapest' => 'openai/gpt-oss-20b',
'smartest' => 'openai/gpt-oss-120b',
],
],
],
If you leave out cheapest and smartest, they fall back to default. If there’s no default either, you need to pass model: on each call.
Step 2: Prompt and stream
The Lab enum now has Lab::OpenResponses (value 'open-responses') and Lab::LaravelCloud (value 'laravel-cloud'). You can use either the enum or the string:
use Laravel\Ai\Enums\Lab;
use function Laravel\Ai\agent;
$response = agent(instructions: 'You are a concise assistant.')
->prompt('Explain PHP fibers.', provider: Lab::OpenResponses);
// Pick a specific model on the server
$response = agent()
->prompt('Explain PHP fibers.', provider: 'open-responses', model: 'qwen/qwen3-32b');
Streaming works the same way as with other providers:
foreach (agent()->stream('Summarise this changelog.', provider: Lab::OpenResponses) as $event) {
// StreamEvent instances: TextDelta, ReasoningDelta, ToolCall, StreamEnd, ...
}
Here’s a small controller that streams a summary to the browser:
use Laravel\Ai\Enums\Lab;
use function Laravel\Ai\agent;
Route::post('/summaries', function (Request $request) {
$text = $request->validate(['text' => 'required|string|max:20000'])['text'];
return agent(instructions: 'Summarise in five bullet points.')
->stream($text, provider: Lab::OpenResponses);
});
Step 3: Turn on stateful continuation if your server supports it
By default, every step of a multi-step tool loop resends the full history. The driver also replays opaque encrypted_content reasoning items. If your server stores responses and supports previous_response_id, the PR says you can opt in with store:
'open-responses' => [
'driver' => 'open-responses',
'url' => env('OPEN_RESPONSES_URL'),
'key' => env('OPEN_RESPONSES_API_KEY'),
'store' => true,
'models' => ['text' => ['default' => 'my-model']],
],
Only turn this on if you know the server stores responses. Otherwise, keep the stateless default.
Step 4: Run several servers side by side
You can register more than one provider with 'driver' => 'open-responses', for example a local vLLM box and a hosted router. Provider options are matched by the configured provider name, so each server can get its own settings:
use Laravel\Ai\Contracts\Agent;
use Laravel\Ai\Contracts\HasProviderOptions;
use Laravel\Ai\Enums\Lab;
use Laravel\Ai\Promptable;
class LocalAssistant implements Agent, HasProviderOptions
{
use Promptable;
public function instructions(): string
{
return 'You are a helpful assistant.';
}
public function providerOptions(Lab|string $provider): array
{
return match ($provider) {
'my-vllm' => ['reasoning' => ['effort' => 'high']],
'open-responses' => ['top_logprobs' => 2],
default => [],
};
}
}
According to the PR, standard function tools and structured output (HasStructuredOutput, with or without #[Strict]) work without changes. Hosted provider tools the server doesn’t support are skipped, and ToolSearch is unwrapped into plain function tools.
The new Laravel Cloud gateway provider
The second v1.5.0 change, PR #1282, adds a laravel-cloud provider for the Laravel Cloud AI gateway. The shipped config reads:
'laravel-cloud' => [
'driver' => 'laravel-cloud',
'key' => env('LARAVEL_CLOUD_MODEL_GATEWAY_API_KEY'),
'url' => env('LARAVEL_CLOUD_MODEL_GATEWAY_URL', 'https://gateway.laravel.cloud'),
],
The PR says Laravel Cloud injects LARAVEL_CLOUD_MODEL_GATEWAY_API_KEY for you. Anthropic models go through the gateway’s Messages endpoint, and everything else goes through its Open Responses endpoint:
use Laravel\Ai\Enums\Lab;
use function Laravel\Ai\agent;
agent()->prompt('Hello', provider: Lab::LaravelCloud, model: 'anthropic/claude-sonnet-5');
agent()->prompt('Hello', provider: 'laravel-cloud', model: 'mistral/mistral-large-3');
The PR lists the default text models as anthropic/claude-sonnet-5 (default), anthropic/claude-haiku-4-5 (cheapest) and anthropic/claude-opus-5-5 (smartest). You can change them with models.text in the provider config. Provider options for the matching lab (anthropic or open-responses) are merged with any laravel-cloud options, and the laravel-cloud options win.
Testing tips
- Test against a local server first. Ollama, LM Studio and vLLM are all named in the PR as Open Responses servers. Use them to check streaming and tool calls before you point production at a hosted endpoint.
- Leave
keyasnullor empty for local servers. Don’t put a dummy token in.env. - If you use
store => true, write a test that runs a two-step tool loop. That confirms the server really honoursprevious_response_id.
Takeaway
Laravel AI SDK 1.5 is a small release that opens the SDK up to a much wider range of servers. With the open-responses driver, one Laravel codebase can switch between OpenAI-style hosted models and self-hosted servers without changing your agent classes. If you deploy on Laravel Cloud, the new gateway provider saves you managing separate provider keys. Upgrade with Composer, add the two config entries, and try Lab::OpenResponses against a local model.
