# Changelog

**Package:** Anthropic Laravel | **Version:** 1 | **URL:** https://mozex.dev/docs/anthropic-laravel/v1/changelog

---

All notable changes to `anthropic-laravel` will be documented in this file.

## 1.15.0 - 2026-11-06

### What's Changed

* Requires `mozex/anthropic-php` 1.15, with its stream helpers and the streamed refusal fallback.
* A stream from `Anthropic::messages()->createStreamed()` can be returned from a route: `toEventStream()` for Laravel's `useEventStream`, `toTextStream()` for `useStream`, and `toVercelStream()` for the AI SDK's `useChat`.
* `broadcastTo()` sends a stream over Reverb or Pusher from a queued job, its text coalesced into `claude.delta` events that stay under the broadcaster's size limit.
* The `InteractsWithClaudeStreams` trait streams a reply into a Livewire component with `streamClaude($stream, to: 'answer')`.
* With `ANTHROPIC_FALLBACK_MODELS` set, streams fall back too.
* `Anthropic::messages()` returns the package's own Messages resource, which implements `MessagesContract`.

`UPGRADING.md` lists the changes that can affect code written against 1.14, such as an `instanceof Anthropic\Resources\Messages` check that's now false.

**Full Changelog**: [1.14.0...1.15.0](https://github.com/mozex/anthropic-laravel/compare/1.14.0...1.15.0)

## 1.14.0 - 2026-11-04

### What's Changed

* Requires `mozex/anthropic-php` 1.14, with its stream completion handler and the billed-token helpers.
* An opt-in usage ledger writes every billed call, stream and batch result to an `anthropic_requests` table, each row billed to whoever `Anthropic::for($user, feature: ...)` names. `php artisan anthropic:usage` sums it, and `model:prune` prunes it.
* `UsageRecorded` is dispatched for every billed call, whether the ledger is on or not.
* Token budgets: `Anthropic::budget('user:'.$user->id)->perDay(200_000)->enforce()`, the `anthropic.budget` route middleware and the `Anthropic\Laravel\Queue\TokenBudget` job middleware. Once a budget is used up, calls are refused before they're sent, with a 429 on a route and a release on a queue. Several budgets can hold at once.
* With `ANTHROPIC_CONTEXT=true`, streams add their tokens to Context too.

`UPGRADING.md` lists the changes that can affect code written against 1.13, such as streams now adding their tokens to Context.

**Full Changelog**: [1.13.0...1.14.0](https://github.com/mozex/anthropic-laravel/compare/1.13.0...1.14.0)

## 1.13.0 - 2026-11-02

### What's Changed

* Requires `mozex/anthropic-php` 1.13, with its new fakes, `batches()->wait()` and the token-limit helpers.
* `Anthropic::batch($requests)->then(...)->dispatch()` sends a Message Batch and polls it in a queued job until it ends, on any connection or tenant key. `catch()`, `onQueue()`, `onConnection()`, `every()` and `timeout()` set the rest, and `BatchSubmitted`, `BatchResultReceived` (once per result) and `BatchEnded` are dispatched along the way.
* `Anthropic::connection()` and `withApiKey()` return `Anthropic\Laravel\Connection`.
* `Anthropic::record()` records the default connection's calls once and replays them from a file.
* `Anthropic::assertBatched()`, `assertNotBatched()`, and the fake's new assertions and responders through the facade.
* The `ThrottlesAnthropic` job middleware fails a job on the spend cap (dispatching `SpendCapReached`) and on errors a retry can't fix, and releases it on rate limits and overloads, holding the key back meanwhile.
* `Anthropic::models()->cached()` keeps the model list in the cache, refreshed in the background once it's an hour old.
* `php artisan anthropic:batches`, `anthropic:ping`, `anthropic:count-tokens`, `anthropic:chat` and `anthropic:models`.
* The `FitsInTokens` validation rule fails a text that would count more input tokens than a limit.

`UPGRADING.md` lists the changes that can affect code written against 1.12, such as `Anthropic::connection()` now returning `Connection`.

**Full Changelog**: [1.12.0...1.13.0](https://github.com/mozex/anthropic-laravel/compare/1.12.0...1.13.0)

## 1.12.0 - 2026-11-01

### What's Changed

* Requires `mozex/anthropic-php` 1.12, with its typed exceptions, retries, middleware, per-request options and refusal fallback.
* Named connections under `connections`, reached with `Anthropic::connection('name')`. `Anthropic::withApiKey()` builds a client for a tenant's key (without the default `workspace_id`), and `Anthropic::organization()`, `enterprise()` and `compliance()` reach the Admin, Enterprise and Compliance keys.
* One `Anthropic::fake()` answers every connection; `assertSentOn()` checks which one a call used.
* The facade's root is `AnthropicManager`, so macros work on it.
* New config keys `auth_token`, `workspace_id`, `connect_timeout`, `max_retries`, `fallback_models`, `middleware` (the client's own, such as `OpenTelemetryMiddleware`), `headers`, `context` and `http` (Guzzle `middleware`, `laravel_client`, `laravel_events`, `telescope`, `nightwatch`). `anthropic:install` names the keys an older published file lacks and adds their `.env` lines, commented out.
* A config value of the wrong type, such as `max_retries`, throws when the client is built, naming the key.
* `Anthropic::withOptions()`, `Anthropic::request()` and `iterate()` on the list resources, with fakes.
* Every request dispatches `RequestSending`, `ResponseReceived`, `RequestFailed` and `RateLimited`, with serializable data and no credentials or MCP server tokens.
* `http.laravel_client` lets `Http::fake()` see the calls, and `http.laravel_events` lets Telescope record them.
* With laravel/ai installed and no key of its own, the package uses laravel/ai's Anthropic key and URL.
* `php artisan anthropic:doctor` checks the key, the API, the queues' `retry_after` against the longest call, and the fallback models' lifecycle, and exits non-zero on a failure.
* `php artisan about` shows an Anthropic section.
* `ANTHROPIC_CONTEXT=true` adds request IDs and token counts to Laravel's Context, and `ANTHROPIC_HTTP_TELESCOPE=true` records tagged Telescope entries. With Laravel Nightwatch installed, the calls show up there; `ANTHROPIC_HTTP_NIGHTWATCH=false` leaves them out.
* A Boost guideline with the rules that trip people up, always in an agent's context.
* The error-handling docs and the Boost skill use the typed exceptions.

#### Fixes

* The models list's `lifecycle` filter now applies.
* An empty `ANTHROPIC_REQUEST_TIMEOUT=` line means the default 30 seconds instead of making every request throw a `TypeError`.
* A key in the config stays out of a stack trace's arguments when building a client fails, since error trackers such as Flare collect them.

`UPGRADING.md` lists the changes that can affect code written against 1.10.

**Full Changelog**: [1.10.0...1.12.0](https://github.com/mozex/anthropic-laravel/compare/1.10.0...1.12.0)

## 1.10.0 - 2026-11-01

### What's Changed

* Requires `mozex/anthropic-php` 1.10, with its typed fields, lossless `toArray()`, API version option and error fixes.
* New `api_version` (`ANTHROPIC_API_VERSION`) and `base_url` (`ANTHROPIC_BASE_URL`) config keys. `base_url` works like the official SDKs: `/v1` is added unless the URL already ends in it. A config published by an earlier release needs both keys added by hand; `anthropic:install` names what's missing.
* `anthropic:install` adds each `.env` key a file lacks, the optional ones commented out.
* `Anthropic::fake()` also replaces the client for code that has `ClientContract` injected.
* `php artisan vendor:publish --tag=anthropic-config` publishes the config file.
* The docs and the Boost skill cover the new config keys, the computer and browser toolsets (dispatching on `toolset_name`), programmatic tool calling, the MCP connector, streamed refusals, model lifecycle checks, reading `retryAfter` in a queued job, and uploading a request's file under its original name. The skill also says to keep the queue's `retry_after` above the job's timeout, so a slow call isn't run and paid for twice.

#### Fixes

* The error-handling docs and the Boost skill match overloads with `getErrorType()`, which also catches an overload in the middle of a stream.
* The docs replace the client through `$this->app->extend(ClientContract::class, ...)`; a binding made earlier in a service provider was dropped when the deferred provider loaded.
* The tool use docs and the Boost skill no longer tell you to skip a tool call made from code execution: such a call is waiting for your result.

#### Upgrading

A dependency typed `Anthropic\Client` can't take the fake and throws a `TypeError` after `Anthropic::fake()`; type-hint `ClientContract`. Classes are no longer `final`. See `UPGRADING.md`.

**Full Changelog**: [1.9.0...1.10.0](https://github.com/mozex/anthropic-laravel/compare/1.9.0...1.10.0)

## 1.9.0 - 2026-10-08

### What's Changed

* Drop Laravel 11 support
* Bump minimum `laravel/framework` requirement from `^11.29|^12.12|^13.0` to `^12.69|^13.30`
* Add the package banner and icon

Laravel 11 stopped receiving security fixes on March 12, 2026. Three advisories published since then ([GHSA-5vg9-5847-vvmq](https://github.com/advisories/GHSA-5vg9-5847-vvmq), [GHSA-crmm-hgp2-wgrp](https://github.com/advisories/GHSA-crmm-hgp2-wgrp) and [GHSA-jh5r-qr3c-85q8](https://github.com/advisories/GHSA-jh5r-qr3c-85q8)) affect every Laravel 11 release and were fixed only in Laravel 12 and 13. The new minimums, 12.69.0 and 13.30.0, are the first releases that include all three fixes.

If your app is still on Laravel 11, Composer keeps you on 1.8.2.

**Full Changelog**: [1.8.2...1.9.0](https://github.com/mozex/anthropic-laravel/compare/1.8.2...1.9.0)

## 1.8.2 - 2026-10-04

### What's Changed

* Improve package setup

**Full Changelog**: [1.8.1...1.8.2](https://github.com/mozex/anthropic-laravel/compare/1.8.1...1.8.2)

## 1.8.1 - 2026-09-13

### What's Changed

#### Fixed

**Boost skill**

- The `description` in `resources/boost/skills/anthropic-laravel/SKILL.md` is down from 1,226 to 814 characters, under the 1,024-character limit in the Agent Skills spec. Codex CLI before 0.142 skipped the whole skill because of the length, and newer Codex and VS Code cut the description off at 1,024. Every trigger term is still there. The Context7 pointer that left the description still lives in the skill body.
- Run `php artisan boost:update` after updating so your agents pick up the new description.

Reported by @kasparovabi in https://github.com/mozex/anthropic-laravel/issues/16

**Full Changelog**: [1.8.0...1.8.1](https://github.com/mozex/anthropic-laravel/compare/1.8.0...1.8.1)

## 1.8.0 - 2026-08-01

### What's Changed

#### Added

**Server-side fallback for refused requests**

- On Claude Fable 5 and Opus 5 you can pass `'fallbacks' => 'default'` with the `server-side-fallback-2026-07-01` beta so the API retries a refused request on another model instead of returning the refusal. The response DTOs from `anthropic-php` 1.8.0 parse the whole flow: the `fallback` content block, per-attempt `usage->iterations`, and `stop_details->recommended_model`.

```php
use Anthropic\Laravel\Facades\Anthropic;
use Illuminate\Support\Facades\Log;

$response = Anthropic::messages()->create([
    'model' => 'claude-fable-5',
    'max_tokens' => 1024,
    'fallbacks' => 'default',
    'betas' => ['server-side-fallback-2026-07-01'],
    'messages' => [['role' => 'user', 'content' => $prompt]],
]);

foreach ($response->usage->iterations ?? [] as $iteration) {
    if ($iteration->type === 'fallback_message') {
        Log::info('Served by fallback model', ['model' => $iteration->model]);
    }
}


```
#### Improved

**Documentation**

- The [Messages guide](https://mozex.dev/docs/anthropic-laravel/v1/usage/messages) covers the expanded refusal categories (`frontier_llm`, `reasoning_extraction`, `general_harms`) and the new fallback section with a logging pattern, so refusal metrics don't misreport which model answered.
- The Server Tools guide mentions the latest `web_search_20260318` version and its `response_inclusion` parameter.

**Boost skill**

- The refusal section of `resources/boost/skills/anthropic-laravel/SKILL.md` picks up the expanded category list and a pointer to the fallback flow, so AI assistants working in your app suggest current values.

**Dependency**

- Bump `mozex/anthropic-php` to `^1.8.0`. Everything in that release flows through the facade automatically: `usage->outputTokensDetails` (thinking token breakdown), `usage->speed` (fast mode), `usage->iterations`, compaction content blocks and `context_management`, and cache diagnostics. See the [PHP 1.8.0 release notes](https://github.com/mozex/anthropic-php/releases/tag/1.8.0) for details and examples.

**Full Changelog**: [1.7.0...1.8.0](https://github.com/mozex/anthropic-laravel/compare/1.7.0...1.8.0)

## 1.7.0 - 2026-04-18

### What's Changed

#### Added

**Files API**

- `Anthropic::files()` exposes the full Files resource: `upload`, `list`, `retrieveMetadata`, `download`, `delete`. Upload a document once and reference it by `file_id` in later Messages calls, or read outputs produced by the code execution tool and Skills.

```php
use Anthropic\Laravel\Facades\Anthropic;
use Illuminate\Support\Facades\Storage;

$file = Anthropic::files()->upload([
    'file' => Storage::disk('local')->readStream('doc.pdf'),
]);

$response = Anthropic::messages()->create([
    'model' => 'claude-opus-4-6',
    'max_tokens' => 1024,
    'betas' => ['files-api-2025-04-14'],
    'messages' => [[
        'role' => 'user',
        'content' => [
            ['type' => 'text', 'text' => 'Summarise this.'],
            ['type' => 'document', 'source' => ['type' => 'file', 'file_id' => $file->id]],
        ],
    ]],
]);


```
- Anthropic currently flags this endpoint as beta. The SDK auto-injects the required `anthropic-beta: files-api-2025-04-14` header on every `Anthropic::files()` call, so there's nothing to configure. When you reference a `file_id` inside a Messages call, pass `'betas' => ['files-api-2025-04-14']` on the Messages call as well; the Messages endpoint also needs the header when a file is referenced. If every Messages call in your app references uploaded files, put the beta globally via `config('anthropic.beta')` instead.

**Testing**

- `FileResponse::fake()`, `FileListResponse::fake()`, and `DeletedFileResponse::fake()` now plug into `Anthropic::fake([...])` with `assertSent(Files::class, ...)` assertions, same as every other resource.

**Documentation**

- New [Files guide](https://mozex.dev/docs/anthropic-laravel/v1/usage/files) covering upload, list, retrieve, download, delete, and Messages integration with Laravel-idiomatic patterns: `Storage::readStream` for uploads, queued jobs that stream downloads to S3, Eloquent `anthropic_file_id` columns, and the `RateLimiter::for('anthropic-files', fn () => Limit::perMinute(90))` throttle for bulk uploads.

**Boost skill**

- `resources/boost/skills/anthropic-laravel/SKILL.md` picks up a new Files section covering the five methods, the Messages-side beta gotcha, block-to-file-type pairing, and the Eloquent + queued-job patterns. Triggers expanded to include `Anthropic::files()`, `FileResponse`, and file upload/reference work.

#### Improved

- Bump `mozex/anthropic-php` to `^1.7.0`. See the [PHP 1.7.0 release notes](https://github.com/mozex/anthropic-php/releases/tag/1.7.0) for the underlying implementation, including the auto-injection mechanism and the 40 Files-specific tests behind this release.

**Full Changelog**: [1.6.0...1.7.0](https://github.com/mozex/anthropic-laravel/compare/1.6.0...1.7.0)

## 1.6.0 - 2026-04-18

### What's Changed

* Add Anthropic beta header support

**Full Changelog**: [1.5.0...1.6.0](https://github.com/mozex/anthropic-laravel/compare/1.5.0...1.6.0)

## 1.5.0 - 2026-04-14

### What's Changed

#### Added

**Laravel Boost skill**

- Ship a Laravel Boost skill at `resources/boost/skills/anthropic-laravel/SKILL.md` so AI coding assistants pick up package conventions automatically when working in a Laravel project. Activates on any mention of the `Anthropic` facade, the underlying SDK classes, or Claude-related work.
- Covers the full surface: messages, streaming, tool use, extended thinking, web search, code execution, citations, batches, token counting, models, testing with `Anthropic::fake()`, and error handling with the queue-retry pattern.
- Calls out the five gotchas that actually cause bugs: inconsistent property casing across DTOs, the `caller?->type === 'direct'` filter required in tool dispatchers, `pause_turn` resume semantics, refusal responses arriving with HTTP 200, and mid-stream errors throwing after the response started.
- Designed for progressive disclosure: keeps Laravel patterns and pitfalls in full, defers exhaustive reference material to Context7 (`/mozex/anthropic-laravel`, `/mozex/anthropic-php`) or direct fetches from the docs site, both of which serve markdown for AI agents.

**Documentation site**

- Ship the full documentation at [mozex.dev/docs/anthropic-laravel/v1](https://mozex.dev/docs/anthropic-laravel/v1) with dedicated pages for every feature: introduction, configuration, messages, streaming, tool use, thinking, server tools, citations, token counting, models, batches, completions, meta information, error handling, and testing.
- Every page leads with Laravel-idiomatic examples: Facade calls, `ShouldQueue` jobs, `Cache::remember` for the model list, `Storage::disk` for vision and PDF citations, broadcasting from streamed responses, scheduled commands for batch polling, and `bootstrap/app.php` `reportable()` callbacks for silencing overload errors.
- Each page links back to the matching page in the [PHP SDK docs](https://mozex.dev/docs/anthropic-php/v1) for deeper schema reference, so the Laravel docs stay focused on the 80% Laravel path without duplicating SDK material.

#### Improved

- Bump `mozex/anthropic-php` to `^1.5.0`. All API additions land transparently through the `Anthropic` facade: the `caller` object on tool blocks, `container_upload` blocks, `stop_details` on refusals, the typed model `capabilities` tree, `inferenceGeo` on usage, and Priority Tier rate-limit headers as typed properties on `MetaInformation`. See the [PHP 1.5.0 release notes](https://github.com/mozex/anthropic-php/releases/tag/1.5.0) for the full feature list.

**Full Changelog**: [1.4.0...1.5.0](https://github.com/mozex/anthropic-laravel/compare/1.4.0...1.5.0)

## 1.4.0 - 2026-04-01

* Expand README to document new Anthropic features and improved testing controls
* bump mozex/anthropic-php dependency

**Full Changelog**: [1.3.3...1.4.0](https://github.com/mozex/anthropic-laravel/compare/1.3.3...1.4.0)

## 1.3.3 - 2026-03-05

### What's Changed

* Laravel 13.x Compatibility by @laravel-shift in [#12](https://github.com/mozex/anthropic-laravel/pull/12)
* updated model names for consistency

### New Contributors

* @laravel-shift made their first contribution in [#12](https://github.com/mozex/anthropic-laravel/pull/12)

**Full Changelog**: [1.3.2...1.3.3](https://github.com/mozex/anthropic-laravel/compare/1.3.2...1.3.3)

## 1.3.2 - 2026-03-05

* bump anthropic-php
* update readme
* sync version with anthropic-php

**Full Changelog**: [1.3.0...1.3.2](https://github.com/mozex/anthropic-laravel/compare/1.3.0...1.3.2)

## 1.3.0 - 2026-03-04

### What's Changed

* Bump `mozex/anthropic-php` to ^1.2.0
* bump dependencies
* dropped php 8.1 support
* dropped laravel 9 and 10 support

See the [anthropic-php UPGRADING.md](https://github.com/mozex/anthropic-php/blob/main/UPGRADING.md) for details on new features and changes. All changes are backwards compatible.

**Full Changelog**: [1.2.0...1.3.0](https://github.com/mozex/anthropic-laravel/compare/1.2.0...1.3.0)

## 1.2.0 - 2025-02-25

### What's Changed

* Add Laravel 12 compatibility by @mozex in [#6](https://github.com/mozex/anthropic-laravel/pull/6)

**Full Changelog**: [1.1.0...1.2.0](https://github.com/mozex/anthropic-laravel/compare/1.1.0...1.2.0)

## 1.1.0 - 2024-12-21

- Changed underlying mozex/anthropic-php package version from v1.0.3 to v1.1.0

**Full Changelog**: [1.0.3...1.1.0](https://github.com/mozex/anthropic-laravel/compare/1.0.3...1.1.0)

## 1.0.3 - 2024-12-20

* [bump dependencies](https://github.com/mozex/anthropic-laravel/commit/1805d40bbcc96be5bc52d7c5572e51cb99bc6724)
* [add php 8.4 to workflow](https://github.com/mozex/anthropic-laravel/commit/cb5960634daf69a9506c1544dc601345a59fae3a)
* Changed underlying mozex/anthropic-php package version from v1.0.2 to v1.0.3

**Full Changelog**: [1.0.2...1.0.3](https://github.com/mozex/anthropic-laravel/compare/1.0.2...1.0.3)

## 1.0.2 - 2024-08-15

### What's Changed

* Bump dependencies
* Changed underlying `mozex/anthropic-php` package version from v1.0.1 to v1.0.2

**Full Changelog**: [1.0.1...1.0.2](https://github.com/mozex/anthropic-laravel/compare/1.0.1...1.0.2)

## 1.0.1 - 2024-05-01

- fix facade docs

## 1.0.0 - 2024-05-01

Initial Release

---

## Table of Contents

- [Introduction](https://mozex.dev/docs/anthropic-laravel/v1)
- [AI Integration](https://mozex.dev/docs/anthropic-laravel/v1/ai-integration)
- [Support Us](https://mozex.dev/docs/anthropic-laravel/v1/support-us)
- [Requirements](https://mozex.dev/docs/anthropic-laravel/v1/requirements)
- [Changelog](https://mozex.dev/docs/anthropic-laravel/v1/changelog)
- [Contributing](https://mozex.dev/docs/anthropic-laravel/v1/contributing)
- [Questions & Issues](https://mozex.dev/docs/anthropic-laravel/v1/questions-and-issues)
- [About Mozex](https://mozex.dev/docs/anthropic-laravel/v1/about)

### Usage

- [Messages](https://mozex.dev/docs/anthropic-laravel/v1/usage/messages)
- [Streaming](https://mozex.dev/docs/anthropic-laravel/v1/usage/streaming)
- [Tool Use](https://mozex.dev/docs/anthropic-laravel/v1/usage/tool-use)
- [Thinking](https://mozex.dev/docs/anthropic-laravel/v1/usage/thinking)
- [Server Tools](https://mozex.dev/docs/anthropic-laravel/v1/usage/server-tools)
- [Citations](https://mozex.dev/docs/anthropic-laravel/v1/usage/citations)
- [Token Counting](https://mozex.dev/docs/anthropic-laravel/v1/usage/token-counting)
- [Models](https://mozex.dev/docs/anthropic-laravel/v1/usage/models)
- [Batches](https://mozex.dev/docs/anthropic-laravel/v1/usage/batches)
- [Completions](https://mozex.dev/docs/anthropic-laravel/v1/usage/completions)
- [Files](https://mozex.dev/docs/anthropic-laravel/v1/usage/files)
- [Raw Requests](https://mozex.dev/docs/anthropic-laravel/v1/usage/raw-requests)
- [Usage Ledger](https://mozex.dev/docs/anthropic-laravel/v1/usage/usage-ledger)
- [Token Budgets](https://mozex.dev/docs/anthropic-laravel/v1/usage/token-budgets)

### Reference

- [Configuration](https://mozex.dev/docs/anthropic-laravel/v1/reference/configuration)
- [Error Handling](https://mozex.dev/docs/anthropic-laravel/v1/reference/error-handling)
- [Meta Information](https://mozex.dev/docs/anthropic-laravel/v1/reference/meta-information)
- [Testing](https://mozex.dev/docs/anthropic-laravel/v1/reference/testing)
- [Using alongside laravel/ai](https://mozex.dev/docs/anthropic-laravel/v1/reference/laravel-ai)
- [Diagnostics](https://mozex.dev/docs/anthropic-laravel/v1/reference/diagnostics)