# SDK Changelog

> Release history for the AnyRouter TypeScript SDK (@anyr/sdk) and the Vercel AI SDK provider (@anyr/ai-sdk-provider).


<!-- Generated by scripts/build-changelog-docs.ts from the package CHANGELOG.md — do not edit. -->

# AnyRouter SDK — Changelog

Release notes for the AnyRouter TypeScript SDK packages.

## [`@anyr/sdk`](https://www.npmjs.com/package/@anyr/sdk)

Official TypeScript SDK for the AnyRouter API.

### Unreleased

#### ⚠ BREAKING CHANGES

* **sdk:** removed the `cacheKey` request option. The API no longer forwards a client `cf-aig-cache-key` (a custom key was shared across all callers of the gateway), so the option did nothing. `cacheTtl` and `skipCache` are unchanged.

#### 🐛 Bug Fixes

* **docs:** error-handling table now lists every mapped status — added `BadRequestError` (400) and `UnprocessableEntityError` (422), and documents that `AnyRouterError` is the catch-all base class

#### 🏗️ Internal

* declare `"sideEffects": false` so downstream bundlers can tree-shake unused resources — the SDK has no top-level side effects

### [1.0.4](https://github.com/duyet/anyrouter/compare/sdk-v1.0.3...sdk-v1.0.4) (2026-11-04)


#### ♻️ Refactoring

* **sdk:** drop section banner comments ([fa700dc](https://github.com/duyet/anyrouter/commit/fa700dc8bd631ee6ef70ca6958bb6d4964d0a100))

### [1.0.3](https://github.com/duyet/anyrouter/compare/sdk-v1.0.2...sdk-v1.0.3) (2026-10-02)


#### 🐛 Bug Fixes

* **catalog:** show BYOK-only models as billed by your provider, not $0 ([#4125](https://github.com/duyet/anyrouter/issues/4125)) ([8e8e15d](https://github.com/duyet/anyrouter/commit/8e8e15da2cc704edbbe9a5ba323cb3918f4c9df4))

### [1.0.2](https://github.com/duyet/anyrouter/compare/sdk-v1.0.1...sdk-v1.0.2) (2026-09-28)


#### ✨ Features

* **models:** expose reasoning and completion metadata ([#3511](https://github.com/duyet/anyrouter/issues/3511)) ([d3bebfe](https://github.com/duyet/anyrouter/commit/d3bebfef515382e4da4b421fb0e0acff6a9c9708))


#### 🐛 Bug Fixes

* **release:** repair version drift from stale release-please branch merges ([#3555](https://github.com/duyet/anyrouter/issues/3555)) ([ff0a89f](https://github.com/duyet/anyrouter/commit/ff0a89f1051e6a22bae1ae76ed4bed85e3330102))

### 1.0.0 (2026-09-24)


#### ✨ Features

* **routing:** honor exacto, tools, and 1M context on auto and presets ([#2979](https://github.com/duyet/anyrouter/issues/2979)) ([1df73ef](https://github.com/duyet/anyrouter/commit/1df73efa3c91f2dea48b7dc821dbbcd9ba033f1c)), closes [#2978](https://github.com/duyet/anyrouter/issues/2978)


#### ⚡ Performance

* **api:** bound and trim the keys-list KV payload ([#2597](https://github.com/duyet/anyrouter/issues/2597)) ([#3081](https://github.com/duyet/anyrouter/issues/3081)) ([8bd0a93](https://github.com/duyet/anyrouter/commit/8bd0a938927743cf0f7adc518deee272ce890aa0))

### [1.0.1](https://github.com/duyet/anyrouter/compare/sdk-v1.0.0...sdk-v1.0.1) (2026-09-24)


#### ✨ Features

* **routing:** honor exacto, tools, and 1M context on auto and presets ([#2979](https://github.com/duyet/anyrouter/issues/2979)) ([1df73ef](https://github.com/duyet/anyrouter/commit/1df73efa3c91f2dea48b7dc821dbbcd9ba033f1c)), closes [#2978](https://github.com/duyet/anyrouter/issues/2978)


#### ⚡ Performance

* **api:** bound and trim the keys-list KV payload ([#2597](https://github.com/duyet/anyrouter/issues/2597)) ([#3081](https://github.com/duyet/anyrouter/issues/3081)) ([8bd0a93](https://github.com/duyet/anyrouter/commit/8bd0a938927743cf0f7adc518deee272ce890aa0))

### 1.0.0 (2026-09-23)


#### ✨ Features

* **routing:** honor exacto, tools, and 1M context on auto and presets ([#2979](https://github.com/duyet/anyrouter/issues/2979)) ([1df73ef](https://github.com/duyet/anyrouter/commit/1df73efa3c91f2dea48b7dc821dbbcd9ba033f1c)), closes [#2978](https://github.com/duyet/anyrouter/issues/2978)


#### ⚡ Performance

* **api:** bound and trim the keys-list KV payload ([#2597](https://github.com/duyet/anyrouter/issues/2597)) ([#3081](https://github.com/duyet/anyrouter/issues/3081)) ([8bd0a93](https://github.com/duyet/anyrouter/commit/8bd0a938927743cf0f7adc518deee272ce890aa0))

### 1.0.0 (2026-08-28)


#### ✨ Features

* **api:** add display_name to model objects for Claude Code gateway discovery ([77520dd](https://github.com/duyet/anyrouter/commit/77520ddc9b6081953b5d76ab790ed082cbd19211))
* **errors:** tell plan_required apart from out-of-credits in clients ([4497f6a](https://github.com/duyet/anyrouter/commit/4497f6a6d2c34e20c9b77b0d5f0a7220f644eca9))


#### 🐛 Bug Fixes

* **catalog:** default /models and GET /api/v1/models to reachable rows ([#2354](https://github.com/duyet/anyrouter/issues/2354)) ([fe92824](https://github.com/duyet/anyrouter/commit/fe928241ce035ef26a3a0f1ea870d56353573502))

### [0.1.5](https://github.com/duyet/anyrouter/compare/sdk-v0.1.4...sdk-v0.1.5) (2026-08-20)


#### ✨ Features

* **errors:** tell plan_required apart from out-of-credits in clients ([4497f6a](https://github.com/duyet/anyrouter/commit/4497f6a6d2c34e20c9b77b0d5f0a7220f644eca9))


#### 🐛 Bug Fixes

* **catalog:** default /models and GET /api/v1/models to reachable rows ([#2354](https://github.com/duyet/anyrouter/issues/2354)) ([fe92824](https://github.com/duyet/anyrouter/commit/fe928241ce035ef26a3a0f1ea870d56353573502))
* **docs:** title-case sidebar folders and slash model ids ([55100ae](https://github.com/duyet/anyrouter/commit/55100aedf37adf5ef275cc7e6272db6b538acf10))

### [0.1.4](https://github.com/duyet/anyrouter/compare/sdk-v0.1.3...sdk-v0.1.4) (2026-08-01)


#### ✨ Features

* **sdk:** cacheTtl/cacheKey/skipCache request options ([1e2ff95](https://github.com/duyet/anyrouter/commit/1e2ff95c988ee3e846337dcbd23d7e268c216883))
* **telemetry:** email engagement tracking and client-type attribution ([ebbdc9d](https://github.com/duyet/anyrouter/commit/ebbdc9dfceb7e263ec39cdab7bea8e9a036f821d))

### 0.1.3 (2026-06-18)

#### 🐛 Bug Fixes

* **transport:** automatically retry transient failures — connection errors, timeouts, and `408`/`409`/`429`/`5xx` responses — with exponential backoff + jitter, honoring `Retry-After` / `Retry-After-Ms` and the `x-should-retry` override header
* **transport:** per-request timeout (default 10 min) via `AbortController`, cleared once response headers arrive so it never aborts an in-progress stream
* per-request options on every resource method — `signal`, `timeout`, `maxRetries`, `headers`
* add `APIUserAbortError`, raised when the caller aborts via an `AbortSignal` (never retried)

### 0.1.2 (2026-06-18)

#### ✨ Features

* initial public release of the official AnyRouter TypeScript SDK
* resources: chat completions, embeddings, images, models, credits, API keys, presets, the OpenAI Responses API, and the Anthropic Messages API
* typed request/response/error envelope, dependency-free SSE streaming, OpenRouter-style provider routing (`provider`, `models`, `route`, `session_id`)
* custom `fetch` implementation and per-client headers

## [`@anyr/ai-sdk-provider`](https://www.npmjs.com/package/@anyr/ai-sdk-provider)

The AnyRouter provider for the Vercel AI SDK.

### Unreleased

#### ⚠ BREAKING CHANGES

* removed the `cacheKey` provider setting and `providerOptions.anyrouter.cacheKey`. The API no longer forwards a client `cf-aig-cache-key` (a custom key was shared across all callers of the gateway), so it did nothing. `cacheTtl` and `skipCache` are unchanged.

#### Bug Fixes

* a mid-stream `data: {"error":{...}}` frame now ends the stream with an `error` part (an `APICallError` that keeps the gateway `code` and `message` in `responseBody`) and finish reason `error`. Before, the frame was dropped and the turn ended as an empty answer.

### [1.0.3](https://github.com/duyet/anyrouter/compare/ai-sdk-provider-v1.0.2...ai-sdk-provider-v1.0.3) (2026-11-04)


#### ♻️ Refactoring

* **ai-sdk-provider:** drop section banner comments ([82941d1](https://github.com/duyet/anyrouter/commit/82941d18072bb200590433ab3b93e90c291bd3f3))


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^1.0.3 to ^1.0.4

### [1.0.2](https://github.com/duyet/anyrouter/compare/ai-sdk-provider-v1.0.1...ai-sdk-provider-v1.0.2) (2026-10-02)


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^1.0.2 to ^1.0.3

### [1.0.1](https://github.com/duyet/anyrouter/compare/ai-sdk-provider-v1.0.0...ai-sdk-provider-v1.0.1) (2026-09-28)


#### 🐛 Bug Fixes

* **release:** repair version drift from stale release-please branch merges ([#3555](https://github.com/duyet/anyrouter/issues/3555)) ([ff0a89f](https://github.com/duyet/anyrouter/commit/ff0a89f1051e6a22bae1ae76ed4bed85e3330102))


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^1.0.1 to ^1.0.2

### 1.0.0 (2026-09-24)


#### 🐛 Bug Fixes

* **sdk:** align ai-sdk-provider range with workspace @anyr/sdk 1.0.0 ([#2846](https://github.com/duyet/anyrouter/issues/2846)) ([7cd866e](https://github.com/duyet/anyrouter/commit/7cd866efc67c14c28e90fc43d1c1a7171f542000))
* **sdk:** restore ai-sdk-provider @anyr/sdk pin to workspace 1.0.0 ([#3041](https://github.com/duyet/anyrouter/issues/3041)) ([1e14da4](https://github.com/duyet/anyrouter/commit/1e14da46cfc9e582ddbd302e9fac70ba1b1ff4ef))


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^1.0.1 to ^1.0.0

### [0.1.10](https://github.com/duyet/anyrouter/compare/ai-sdk-provider-v1.0.0...ai-sdk-provider-v0.1.10) (2026-09-24)


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^1.0.1 to ^1.0.0

### [0.1.9](https://github.com/duyet/anyrouter/compare/ai-sdk-provider-v0.1.8...ai-sdk-provider-v0.1.9) (2026-09-24)


#### 🐛 Bug Fixes

* **sdk:** restore ai-sdk-provider @anyr/sdk pin to workspace 1.0.0 ([#3041](https://github.com/duyet/anyrouter/issues/3041)) ([1e14da4](https://github.com/duyet/anyrouter/commit/1e14da46cfc9e582ddbd302e9fac70ba1b1ff4ef))


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^1.0.0 to ^1.0.1

### [0.1.8](https://github.com/duyet/anyrouter/compare/ai-sdk-provider-v0.1.7...ai-sdk-provider-v0.1.8) (2026-09-04)


#### 🐛 Bug Fixes

* **sdk:** align ai-sdk-provider range with workspace @anyr/sdk 1.0.0 ([#2846](https://github.com/duyet/anyrouter/issues/2846)) ([7cd866e](https://github.com/duyet/anyrouter/commit/7cd866efc67c14c28e90fc43d1c1a7171f542000))


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^1.0.0 to ^0.1.6

### [0.1.7](https://github.com/duyet/anyrouter/compare/ai-sdk-provider-v0.1.5...ai-sdk-provider-v0.1.7) (2026-08-20)


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^0.1.3 to ^0.1.5

### [0.1.5](https://github.com/duyet/anyrouter/compare/ai-sdk-provider-v0.1.4...ai-sdk-provider-v0.1.5) (2026-07-31)


#### ✨ Features

* **ai-sdk-provider:** cache passthrough options ([4090989](https://github.com/duyet/anyrouter/commit/409098972bf55d5ba3dd6e4eeca4ec77493683b3))
* **telemetry:** email engagement tracking and client-type attribution ([ebbdc9d](https://github.com/duyet/anyrouter/commit/ebbdc9dfceb7e263ec39cdab7bea8e9a036f821d))


#### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @anyr/sdk bumped from ^0.1.1 to ^0.1.4

### 0.1.4 (2026-06-18)

#### 🐛 Bug Fixes

* surface `reasoning_content` from reasoning models (DeepSeek-R1, GLM thinking, …) as the AI SDK's standard reasoning parts — `reasoning` / `reasoningText` and the full-stream `reasoning-start` / `reasoning-delta` / `reasoning-end` parts now work

### 0.1.3 (2026-06-18)

#### ✨ Features

* support the Vercel AI SDK v7 (beta) alongside v6 — widened `ai`, `@ai-sdk/provider`, and `@ai-sdk/provider-utils` peer ranges

### 0.1.2 (2026-06-18)

#### ✨ Features

* initial public release of the AnyRouter provider for the Vercel AI SDK
* `createAnyRouter()` / `anyrouter` — chat (`LanguageModelV3`), embeddings, and image models
* tool calling, structured output, streaming, and provider routing / `session_id` / `extraBody` passthrough via provider settings and per-call `providerOptions.anyrouter`
