8000 Tags · jperla/ai · GitHub
[go: up one dir, main page]

Skip to content

Tags

Tags

@ai-sdk/xai@4.0.0-canary.74

Toggle @ai-sdk/xai@4.0.0-canary.74's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (canary) (vercel#16024)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@7.0.0-canary.172

### Patch Changes

-   25a64f8: Remove deprecated experimental generateImage exports.

- 375fdd7: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- f18b08f: fix: redact server error details from UI message streams by
default

`toUIMessageStream`, `createUIMessageStream`, and `toUIMessageChunk`
defaulted their `onError` callback to `getErrorMessage`, which
serializes the raw error (`error.toString()` / `JSON.stringify(error)`)
into the client-facing `{ type: 'error', errorText }` chunk — and also
into `tool-output-error` parts. The documented default was `() => 'An
error occurred.'`, so applications relying on the documented behavior
were unknowingly streaming server exception details (internal hostnames,
paths, provider request data, validation inputs) to end users.

The default `onError` now returns the documented generic `'An error
occurred.'`. Raw error details are only emitted when the developer
explicitly supplies an `onError` handler. This also redacts
`tool-output-error` and invalid-tool-input error text by default; pass
an `onError` to surface richer messages.

- b4507d5: fix(provider-utils): cancel response body on download
rejection to prevent socket leak

When a download was rejected early — because the `Content-Length` header
exceeded the size limit, the response status was not ok, or a redirect
resolved to a blocked URL — the fetch response body was left unconsumed
and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP
socket open instead of returning it to the connection pool, allowing an
attacker-controlled origin to exhaust file descriptors and cause a
denial of service. The body is now cancelled on all early-rejection
paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`,
and `fetchWithValidatedRedirects` cancels each redirect hop's body
before following or rejecting the next hop.

-   Updated dependencies [8c17bf8]

-   Updated dependencies [aeda373]

-   Updated dependencies [558777f]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/gateway@4.0.0-canary.104
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/alibaba@2.0.0-canary.59

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/amazon-bedrock@5.0.0-canary.84

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66
    -   @ai-sdk/openai@4.0.0-canary.73

## @ai-sdk/angular@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/anthropic@4.0.0-canary.66

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/anthropic-aws@1.0.0-canary.7

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66

## @ai-sdk/assemblyai@3.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/azure@4.0.0-canary.75

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/deepseek@3.0.0-canary.54
    -   @ai-sdk/openai@4.0.0-canary.73

## @ai-sdk/baseten@2.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/black-forest-labs@2.0.0-canary.50

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/bytedance@2.0.0-canary.51

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/cerebras@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/cohere@4.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/deepgram@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/deepinfra@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/deepseek@3.0.0-canary.54

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/devtools@1.0.0-canary.30

### Patch Changes

-   32ce45c: fix(devtools): secure devtools viewer api access
-   275674e: fix(devtools): validate viewer database paths

## @ai-sdk/elevenlabs@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/fal@3.0.0-canary.49

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/fireworks@3.0.0-canary.56

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/gateway@4.0.0-canary.104

### Patch Changes

- 8c17bf8: fix(gateway): surface provider warnings in embedding and
reranking responses
- 558777f: fix(gateway): accept deprecated warnings in image, speech,
transcription, and video responses
-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/gladia@3.0.0-canary.49

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/google@4.0.0-canary.81

### Patch Changes

- 5878b40: fix(google): prevent prototype pollution when streaming tool
args

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/google-vertex@5.0.0-canary.107

### Patch Changes

-   Updated dependencies [5878b40]
-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/google@4.0.0-canary.81
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/groq@4.0.0-canary.53

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness@1.0.0-canary.7

### Patch Changes

- 3d87086: fix(harness): guard against invalid resuming a session vs
continuing a turn
- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/harness-claude-code@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness-codex@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness-pi@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/huggingface@2.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/hume@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/klingai@4.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/langchain@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/llamaindex@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/lmnt@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/luma@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/mcp@2.0.0-canary.63

### Patch Changes

-   2a150f8: fix(mcp): lock first sse endpoint received via event

- b44b051: fix(mcp): prevent prototype-named tools from bypassing the
`schemas` allowlist

When using `client.tools({ schemas })` to expose only an explicitly
allowed
subset of an MCP server's tools, the allowlist check used the `in`
operator,
which also matches inherited `Object.prototype` properties. A
server-advertised
tool named `constructor`, `toString`, `__proto__`, etc. would pass the
check
even though the developer never defined it in `schemas`, and was then
exposed to
the model and executable. The check now uses `Object.hasOwn`, so only
    explicitly defined tools are returned.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/mistral@4.0.0-canary.54

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/moonshotai@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/open-responses@2.0.0-canary.53

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/openai@4.0.0-canary.73

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/openai-compatible@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/otel@1.0.0-canary.118

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/perplexity@4.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/policy-opa@1.0.0-canary.9

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/prodia@2.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/provider-utils@5.0.0-canary.48

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

- 375fdd7: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- b4507d5: fix(provider-utils): cancel response body on download
rejection to prevent socket leak

When a download was rejected early — because the `Content-Length` header
exceeded the size limit, the response status was not ok, or a redirect
resolved to a blocked URL — the fetch response body was left unconsumed
and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP
socket open instead of returning it to the connection pool, allowing an
attacker-controlled origin to exhaust file descriptors and cause a
denial of service. The body is now cancelled on all early-rejection
paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`,
and `fetchWithValidatedRedirects` cancels each redirect hop's body
before following or rejecting the next hop.

## @ai-sdk/quiverai@2.0.0-canary.5

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/react@4.0.0-canary.175

### Patch Changes

- 555c5de: fix(react): deny MCP App tool calls by default when
allowedTools is omitted

`experimental_MCPAppRenderer`'s bridge only enforced the `allowedTools`
allowlist when it was non-null, so omitting `allowedTools` skipped the
check and forwarded every `tools/call` from the (untrusted) MCP App
iframe to the host's `callTool`. A malicious or compromised MCP server
could therefore invoke any tool the host wired up.

Tool invocation from MCP App content is now deny-by-default: if
`allowedTools` is not explicitly provided, all `tools/call` requests are
rejected. To expose tools to an app, list them in
`handlers.allowedTools`.

-   Updated dependencies [2a150f8]

-   Updated dependencies [b44b051]

-   Updated dependencies [aeda373]

-   Updated dependencies [25a64f8]

-   Updated dependencies [375fdd7]

-   Updated dependencies [f18b08f]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/mcp@2.0.0-canary.63
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/replicate@3.0.0-canary.50

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/revai@3.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/rsc@3.0.0-canary.173

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/sandbox-just-bash@1.0.0-canary.7

### Patch Changes

- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/sandbox-vercel@1.0.0-canary.7

### Patch Changes

- e551763: fix(harness): avoid using peer dependencies for underlying
harness and s
8000
andbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/svelte@5.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/togetherai@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/tui@1.0.0-canary.7

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/valibot@3.0.0-canary.48

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/vercel@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/voyage@2.0.0-canary.23

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/vue@4.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/workflow@1.0.0-canary.89

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/xai@4.0.0-canary.74

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/xai@3.0.95

Toggle @ai-sdk/xai@3.0.95's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (vercel#16026)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to release-v6.0, this
PR will be updated.


# Releases
## ai@6.0.203

### Patch Changes

- f42aa79: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- 5291f7e: Harden stream text processing and middleware against
prototype pollution from stream part IDs.

- b4b575a: fix: redact server error details from UI message streams by
default

`streamText(...).toUIMessageStream()` and `createUIMessageStream`
defaulted their `onError` callback to `getErrorMessage`, which
serializes the raw error (`error.toString()` / `JSON.stringify(error)`)
into the client-facing `{ type: 'error', errorText }` chunk — and also
into `tool-output-error` parts. The documented default was `() => 'An
error occurred.'`, so applications relying on the documented behavior
were unknowingly streaming server exception details (internal hostnames,
paths, provider request data, validation inputs) to end users.

The default `onError` now returns the documented generic `'An error
occurred.'`. Raw error details are only emitted when the developer
explicitly supplies an `onError` handler. This also redacts
`tool-output-error` and invalid-tool-input error text by default; pass
an `onError` to surface richer messages.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/gateway@3.0.129

## @ai-sdk/alibaba@1.0.28

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/amazon-bedrock@4.0.117

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/anthropic@3.0.84
    -   @ai-sdk/openai@3.0.71

## @ai-sdk/angular@2.0.204

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/anthropic@3.0.84

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/anthropic-aws@1.0.6

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/anthropic@3.0.84

## @ai-sdk/assemblyai@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/azure@3.0.74

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/deepseek@2.0.38
    -   @ai-sdk/openai@3.0.71

## @ai-sdk/baseten@1.0.53

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/black-forest-labs@1.0.36

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/bytedance@1.0.17

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/cerebras@2.0.56

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/cohere@3.0.38

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/deepgram@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/deepinfra@2.0.54

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/deepseek@2.0.38

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/devtools@0.0.19

### Patch Changes

-   f27afa8: fix(devtools): secure devtools viewer api access

## @ai-sdk/elevenlabs@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/fal@2.0.36

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/fireworks@2.0.55

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/gateway@3.0.129

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/gladia@2.0.35

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/google@3.0.82

### Patch Changes

- 3258f22: fix(google): prevent prototype pollution when streaming tool
args

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/google-vertex@4.0.145

### Patch Changes

-   Updated dependencies [3258f22]
-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/google@3.0.82
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/anthropic@3.0.84
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/groq@3.0.41

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/huggingface@1.0.52

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/hume@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/klingai@3.0.20

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/langchain@2.0.210

### Patch Changes

-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   ai@6.0.203

## @ai-sdk/llamaindex@2.0.203

### Patch Changes

-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   ai@6.0.203

## @ai-sdk/lmnt@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/luma@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/mcp@1.0.49

### Patch Changes

-   3e8d9ba: fix(mcp): lock first sse endpoint received via event

- 4fa7354: fix(mcp): prevent prototype-named tools from bypassing the
`schemas` allowlist

When using `client.tools({ schemas })` to expose only an explicitly
allowed
subset of an MCP server's tools, the allowlist check used the `in`
operator,
which also matches inherited `Object.prototype` properties. A
server-advertised
tool named `constructor`, `toString`, `__proto__`, etc. would pass the
check
even though the developer never defined it in `schemas`, and was then
exposed to
the model and executable. The check now uses `Object.hasOwn`, so only
    explicitly defined tools are returned.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/mistral@3.0.39

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/moonshotai@2.0.25

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/open-responses@1.0.18

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/openai@3.0.71

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/openai-compatible@2.0.50

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/perplexity@3.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/prodia@1.0.34

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/provider-utils@4.0.29

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

- f42aa79: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserv
8000
ed `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

## @ai-sdk/quiverai@1.0.2

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/react@3.0.205

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/replicate@2.0.35

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/revai@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/rsc@2.0.203

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/svelte@4.0.203

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/togetherai@2.0.55

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/valibot@2.0.30

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/vercel@2.0.52

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/voyage@1.0.6

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/vue@3.0.203

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/xai@3.0.95

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/xai@2.0.74

Toggle @ai-sdk/xai@2.0.74's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (vercel#16027)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to release-v5.0, this
PR will be updated.


# Releases
## ai@5.0.200

### Patch Changes

- eea9166: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- 15cf74f: Harden stream text processing and middleware against
prototype pollution from stream part IDs.

- 8ad6f80: fix: redact server error details from UI message streams by
default

`streamText(...).toUIMessageStream()` and `createUIMessageStream`
defaulted their `onError` callback to `getErrorMessage`, which
serializes the raw error (`error.toString()` / `JSON.stringify(error)`)
into the client-facing `{ type: 'error', errorText }` chunk — and also
into `tool-output-error` parts. The documented default was `() => 'An
error occurred.'`, so applications relying on the documented behavior
were unknowingly streaming server exception details (internal hostnames,
paths, provider request data, validation inputs) to end users.

The default `onError` now returns the documented generic `'An error
occurred.'`. Raw error details are only emitted when the developer
explicitly supplies an `onError` handler. This also redacts
`tool-output-error` and invalid-tool-input error text by default; pass
an `onError` to surface richer messages.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/gateway@2.0.99

## @ai-sdk/alibaba@0.0.12

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/amazon-bedrock@3.0.102

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/anthropic@2.0.82

## @ai-sdk/angular@1.0.200

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/anthropic@2.0.82

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/assemblyai@1.0.30

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/azure@2.0.111

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/deepseek@1.0.43
    -   @ai-sdk/openai@2.0.107

## @ai-sdk/baseten@0.0.23

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/black-forest-labs@0.0.15

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/cerebras@1.0.45

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/cohere@2.0.30

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @
8000
ai-sdk/provider-utils@3.0.26

## @ai-sdk/deepgram@1.0.29

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/deepinfra@1.0.43

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/deepseek@1.0.43

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/elevenlabs@1.0.29

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/fal@1.0.33

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/fireworks@1.0.41

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/gateway@2.0.99

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/gladia@1.0.28

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/google@2.0.75

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/google-vertex@3.0.142

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/google@2.0.75
    -   @ai-sdk/anthropic@2.0.82
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/groq@2.0.41

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/huggingface@0.0.23

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/hume@1.0.28

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/langchain@1.0.200

### Patch Changes

-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   ai@5.0.200

## @ai-sdk/llamaindex@1.0.200

### Patch Changes

-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   ai@5.0.200

## @ai-sdk/lmnt@1.0.28

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/luma@1.0.28

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/mcp@0.0.19

### Patch Changes

-   d872a7a: fix(mcp): lock first sse endpoint received via event

- f4cd468: fix(mcp): prevent prototype-named tools from bypassing the
`schemas` allowlist

When using `client.tools({ schemas })` to expose only an explicitly
allowed
subset of an MCP server's tools, the allowlist check used the `in`
operator,
which also matches inherited `Object.prototype` properties. A
server-advertised
tool named `constructor`, `toString`, `__proto__`, etc. would pass the
check
even though the developer never defined it in `schemas`, and was then
exposed to
the model and executable. The check now uses `Object.hasOwn`, so only
    explicitly defined tools are returned.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/mistral@2.0.34

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/moonshotai@0.0.11

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/openai@2.0.107

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/openai-compatible@1.0.40

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/perplexity@2.0.31

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/prodia@0.0.10

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/provider-utils@3.0.26

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

- eea9166: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

## @ai-sdk/react@2.0.202

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/replicate@1.0.28

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/revai@1.0.28

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/rsc@1.0.202

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/svelte@3.0.200

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/togetherai@1.0.43

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/valibot@1.0.26

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/vercel@1.0.41

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/vue@2.0.200

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/xai@2.0.74

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/workflow@1.0.0-canary.90

Toggle @ai-sdk/workflow@1.0.0-canary.90's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (canary) (vercel#16084)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@7.0.0-canary.173

### Patch Changes

-   Updated dependencies [efec111]
    -   @ai-sdk/gateway@4.0.0-canary.105

## @ai-sdk/angular@3.0.0-canary.173

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/fireworks@3.0.0-canary.57

### Patch Changes

- 38010a1: Enable `includeUsage` for Fireworks so streaming responses
report token usage

## @ai-sdk/gateway@4.0.0-canary.105

### Patch Changes

- efec111: chore(provider/gateway): update gateway model settings files

## @ai-sdk/harness@1.0.0-canary.9

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/harness-claude-code@1.0.0-canary.5

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/harness-codex@1.0.0-canary.5

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/harness-pi@1.0.0-canary.5

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/langchain@3.0.0-canary.173

### Patch Changes

-   c1afaed: fix(langchain): prevent polluting global object.prototype
    -   ai@7.0.0-canary.173

## @ai-sdk/llamaindex@3.0.0-canary.173

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/mcp@2.0.0-canary.64

### Patch Changes

-   024a6b4: fix(mcp): validate oauth metadata issuer during discovery

## @ai-sdk/otel@1.0.0-canary.119

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/policy-opa@1.0.0-canary.10

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/react@4.0.0-canary.176

### Patch Changes

-   Updated dependencies [024a6b4]
    -   @ai-sdk/mcp@2.0.0-canary.64
    -   ai@7.0.0-canary.173

## @ai-sdk/rsc@3.0.0-canary.174

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/sandbox-just-bash@1.0.0-canary.9

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/sandbox-vercel@1.0.0-canary.9

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/svelte@5.0.0-canary.173

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/tui@1.0.0-canary.8

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/vue@4.0.0-canary.173

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/workflow@1.0.0-canary.90

### Patch Changes

-   ai@7.0.0-canary.173

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/workflow@1.0.0-canary.89

Toggle @ai-sdk/workflow@1.0.0-canary.89's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (canary) (vercel#16024)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@7.0.0-canary.172

### Patch Changes

-   25a64f8: Remove deprecated experimental generateImage exports.

- 375fdd7: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- f18b08f: fix: redact server error details from UI message streams by
default

`toUIMessageStream`, `createUIMessageStream`, and `toUIMessageChunk`
defaulted their `onError` callback to `getErrorMessage`, which
serializes the raw error (`error.toString()` / `JSON.stringify(error)`)
into the client-facing `{ type: 'error', errorText }` chunk — and also
into `tool-output-error` parts. The documented default was `() => 'An
error occurred.'`, so applications relying on the documented behavior
were unknowingly streaming server exception details (internal hostnames,
paths, provider request data, validation inputs) to end users.

The default `onError` now returns the documented generic `'An error
occurred.'`. Raw error details are only emitted when the developer
explicitly supplies an `onError` handler. This also redacts
`tool-output-error` and invalid-tool-input error text by default; pass
an `onError` to surface richer messages.

- b4507d5: fix(provider-utils): cancel response body on download
rejection to prevent socket leak

When a download was rejected early — because the `Content-Length` header
exceeded the size limit, the response status was not ok, or a redirect
resolved to a blocked URL — the fetch response body was left unconsumed
and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP
socket open instead of returning it to the connection pool, allowing an
attacker-controlled origin to exhaust file descriptors and cause a
denial of service. The body is now cancelled on all early-rejection
paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`,
and `fetchWithValidatedRedirects` cancels each redirect hop's body
before following or rejecting the next hop.

-   Updated dependencies [8c17bf8]

-   Updated dependencies [aeda373]

-   Updated dependencies [558777f]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/gateway@4.0.0-canary.104
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/alibaba@2.0.0-canary.59

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/amazon-bedrock@5.0.0-canary.84

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66
    -   @ai-sdk/openai@4.0.0-canary.73

## @ai-sdk/angular@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/anthropic@4.0.0-canary.66

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/anthropic-aws@1.0.0-canary.7

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66

## @ai-sdk/assemblyai@3.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/azure@4.0.0-canary.75

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/deepseek@3.0.0-canary.54
    -   @ai-sdk/openai@4.0.0-canary.73

## @ai-sdk/baseten@2.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/black-forest-labs@2.0.0-canary.50

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/bytedance@2.0.0-canary.51

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/cerebras@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/cohere@4.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/deepgram@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/deepinfra@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/deepseek@3.0.0-canary.54

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/devtools@1.0.0-canary.30

### Patch Changes

-   32ce45c: fix(devtools): secure devtools viewer api access
-   275674e: fix(devtools): validate viewer database paths

## @ai-sdk/elevenlabs@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/fal@3.0.0-canary.49

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/fireworks@3.0.0-canary.56

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/gateway@4.0.0-canary.104

### Patch Changes

- 8c17bf8: fix(gateway): surface provider warnings in embedding and
reranking responses
- 558777f: fix(gateway): accept deprecated warnings in image, speech,
transcription, and video responses
-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/gladia@3.0.0-canary.49

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/google@4.0.0-canary.81

### Patch Changes

- 5878b40: fix(google): prevent prototype pollution when streaming tool
args

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/google-vertex@5.0.0-canary.107

### Patch Changes

-   Updated dependencies [5878b40]
-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/google@4.0.0-canary.81
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/groq@4.0.0-canary.53

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness@1.0.0-canary.7

### Patch Changes

- 3d87086: fix(harness): guard against invalid resuming a session vs
continuing a turn
- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/harness-claude-code@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness-codex@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness-pi@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/huggingface@2.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/hume@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/klingai@4.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/langchain@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/llamaindex@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/lmnt@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/luma@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/mcp@2.0.0-canary.63

### Patch Changes

-   2a150f8: fix(mcp): lock first sse endpoint received via event

- b44b051: fix(mcp): prevent prototype-named tools from bypassing the
`schemas` allowlist

When using `client.tools({ schemas })` to expose only an explicitly
allowed
subset of an MCP server's tools, the allowlist check used the `in`
operator,
which also matches inherited `Object.prototype` properties. A
server-advertised
tool named `constructor`, `toString`, `__proto__`, etc. would pass the
check
even though the developer never defined it in `schemas`, and was then
exposed to
the model and executable. The check now uses `Object.hasOwn`, so only
    explicitly defined tools are returned.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/mistral@4.0.0-canary.54

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/moonshotai@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/open-responses@2.0.0-canary.53

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/openai@4.0.0-canary.73

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/openai-compatible@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/otel@1.0.0-canary.118

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/perplexity@4.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/policy-opa@1.0.0-canary.9

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/prodia@2.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/provider-utils@5.0.0-canary.48

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

- 375fdd7: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- b4507d5: fix(provider-utils): cancel response body on download
rejection to prevent socket leak

When a download was rejected early — because the `Content-Length` header
exceeded the size limit, the response status was not ok, or a redirect
resolved to a blocked URL — the fetch response body was left unconsumed
and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP
socket open instead of returning it to the connection pool, allowing an
attacker-controlled origin to exhaust file descriptors and cause a
denial of service. The body is now cancelled on all early-rejection
paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`,
and `fetchWithValidatedRedirects` cancels each redirect hop's body
before following or rejecting the next hop.

## @ai-sdk/quiverai@2.0.0-canary.5

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/react@4.0.0-canary.175

### Patch Changes

- 555c5de: fix(react): deny MCP App tool calls by default when
allowedTools is omitted

`experimental_MCPAppRenderer`'s bridge only enforced the `allowedTools`
allowlist when it was non-null, so omitting `allowedTools` skipped the
check and forwarded every `tools/call` from the (untrusted) MCP App
iframe to the host's `callTool`. A malicious or compromised MCP server
could therefore invoke any tool the host wired up.

Tool invocation from MCP App content is now deny-by-default: if
`allowedTools` is not explicitly provided, all `tools/call` requests are
rejected. To expose tools to an app, list them in
`handlers.allowedTools`.

-   Updated dependencies [2a150f8]

-   Updated dependencies [b44b051]

-   Updated dependencies [aeda373]

-   Updated dependencies [25a64f8]

-   Updated dependencies [375fdd7]

-   Updated dependencies [f18b08f]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/mcp@2.0.0-canary.63
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/replicate@3.0.0-canary.50

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/revai@3.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/rsc@3.0.0-canary.173

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/sandbox-just-bash@1.0.0-canary.7

### Patch Changes

- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/sandbox-vercel@1.0.0-canary.7

### Patch Changes

- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/svelte@5.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/togetherai@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/tui@1.0.0-canary.7

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/valibot@3.0.0-canary.48

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/vercel@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/voyage@2.0.0-canary.23

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/vue@4.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/workflow@1.0.0-canary.89

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/xai@4.0.0-canary.74

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/vue@4.0.0-canary.173

Toggle @ai-sdk/vue@4.0.0-canary.173's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (canary) (vercel#16084)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@7.0.0-canary.173

### Patch Changes

-   Updated dependencies [efec111]
    -   @ai-sdk/gateway@4.0.0-canary.105

## @ai-sdk/angular@3.0.0-canary.173

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/fireworks@3.0.0-canary.57

### Patch Changes

- 38010a1: Enable `includeUsage` for Fireworks so streaming responses
report token usage

## @ai-sdk/gateway@4.0.0-canary.105

### Patch Changes

- efec111: chore(provider/gateway): update gateway model settings files

## @ai-sdk/harness@1.0.0-canary.9

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/harness-claude-code@1.0.0-canary.5

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/harness-codex@1.0.0-canary.5

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/harness-pi@1.0.0-canary.5

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/langchain@3.0.0-canary.173

### Patch Changes

-   c1afaed: fix(langchain): prevent polluting global object.prototype
    -   ai@7.0.0-canary.173

## @ai-sdk/llamaindex@3.0.0-canary.173

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/mcp@2.0.0-canary.64

### Patch Changes

-   024a6b4: fix(mcp): validate oauth metadata issuer during discovery

## @ai-sdk/otel@1.0.0-canary.119

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/policy-opa@1.0.0-canary.10

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/react@4.0.0-canary.176

### Patch Changes

-   Updated dependencies [024a6b4]
    -   @ai-sdk/mcp@2.0.0-canary.64
    -   ai@7.0.0-canary.173

## @ai-sdk/rsc@3.0.0-canary.174

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/sandbox-just-bash@1.0.0-canary.9

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/sandbox-vercel@1.0.0-canary.9

### Patch Changes

-   @ai-sdk/harness@1.0.0-canary.9

## @ai-sdk/svelte@5.0.0-canary.173

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/tui@1.0.0-canary.8

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/vue@4.0.0-canary.173

### Patch Changes

-   ai@7.0.0-canary.173

## @ai-sdk/workflow@1.0.0-canary.90

### Patch Changes

-   ai@7.0.0-canary.173

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/vue@4.0.0-canary.172

Toggle @ai-sdk/vue@4.0.0-canary.172's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (canary) (vercel#16024)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@7.0.0-canary.172

### Patch Changes

-   25a64f8: Remove deprecated experimental generateImage exports.

- 375fdd7: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- f18b08f: fix: redact server error details from UI message streams by
default

`toUIMessageStream`, `createUIMessageStream`, and `toUIMessageChunk`
defaulted their `onError` callback to `getErrorMessage`, which
serializes the raw error (`error.toString()` / `JSON.stringify(error)`)
into the client-facing `{ type: 'error', errorText }` chunk — and also
into `tool-output-error` parts. The documented default was `() => 'An
error occurred.'`, so applications relying on the documented behavior
were unknowingly streaming server exception details (internal hostnames,
paths, provider request data, validation inputs) to end users.

The default `onError` now returns the documented generic `'An error
occurred.'`. Raw error details are only emitted when the developer
explicitly supplies an `onError` handler. This also redacts
`tool-output-error` and invalid-tool-input error text by default; pass
an `onError` to surface richer messages.

- b4507d5: fix(provider-utils): cancel response body on download
rejection to prevent socket leak

When a download was rejected early — because the `Content-Length` header
exceeded the size limit, the response status was not ok, or a redirect
resolved to a blocked URL — the fetch response body was left unconsumed
and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP
socket open instead of returning it to the connection pool, allowing an
attacker-controlled origin to exhaust file descriptors and cause a
denial of service. The body is now cancelled on all early-rejection
paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`,
and `fetchWithValidatedRedirects` cancels each redirect hop's body
before following or rejecting the next hop.

-   Updated dependencies [8c17bf8]

-   Updated dependencies [aeda373]

-   Updated dependencies [558777f]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/gateway@4.0.0-canary.104
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/alibaba@2.0.0-canary.59

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/amazon-bedrock@5.0.0-canary.84

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66
    -   @ai-sdk/openai@4.0.0-canary.73

## @ai-sdk/angular@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/anthropic@4.0.0-canary.66

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/anthropic-aws@1.0.0-canary.7

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66

## @ai-sdk/assemblyai@3.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/azure@4.0.0-canary.75

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/deepseek@3.0.0-canary.54
    -   @ai-sdk/openai@4.0.0-canary.73

## @ai-sdk/baseten@2.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/black-forest-labs@2.0.0-canary.50

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/bytedance@2.0.0-canary.51

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/cerebras@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/cohere@4.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/deepgram@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/deepinfra@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/deepseek@3.0.0-canary.54

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/devtools@1.0.0-canary.30

### Patch Changes

-   32ce45c: fix(devtools): secure devtools viewer api access
-   275674e: fix(devtools): validate viewer database paths

## @ai-sdk/elevenlabs@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/fal@3.0.0-canary.49

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/fireworks@3.0.0-canary.56

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/gateway@4.0.0-canary.104

### Patch Changes

- 8c17bf8: fix(gateway): surface provider warnings in embedding and
reranking responses
- 558777f: fix(gateway): accept deprecated warnings in image, speech,
transcription, and video responses
-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/gladia@3.0.0-canary.49

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/google@4.0.0-canary.81

### Patch Changes

- 5878b40: fix(google): prevent prototype pollution when streaming tool
args

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/google-vertex@5.0.0-canary.107

### Patch Changes

-   Updated dependencies [5878b40]
-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/google@4.0.0-canary.81
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/groq@4.0.0-canary.53

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness@1.0.0-canary.7

### Patch Changes

- 3d87086: fix(harness): guard against invalid resuming a session vs
continuing a turn
- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/harness-claude-code@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness-codex@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness-pi@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/huggingface@2.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/hume@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/klingai@4.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/langchain@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/llamaindex@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/lmnt@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/luma@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/mcp@2.0.0-canary.63

### Patch Changes

-   2a150f8: fix(mcp): lock first sse endpoint received via event

- b44b051: fix(mcp): prevent prototype-named tools from bypassing the
`schemas` allowlist

When using `client.tools({ schemas })` to expose only an explicitly
allowed
subset of an MCP server's tools, the allowlist check used the `in`
operator,
which also matches inherited `Object.prototype` properties. A
server-advertised
tool named `constructor`, `toString`, `__proto__`, etc. would pass the
check
even though the developer never defined it in `schemas`, and was then
exposed to
the model and executable. The check now uses `Object.hasOwn`, so only
    explicitly defined tools are returned.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/mistral@4.0.0-canary.54

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/moonshotai@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/open-responses@2.0.0-canary.53

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/openai@4.0.0-canary.73

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/openai-compatible@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/otel@1.0.0-canary.118

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/perplexity@4.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/policy-opa@1.0.0-canary.9

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/prodia@2.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/provider-utils@5.0.0-canary.48

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

- 375fdd7: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- b4507d5: fix(provider-utils): cancel response body on download
rejection to prevent socket leak

When a download was rejected early — because the `Content-Length` header
exceeded the size limit, the response status was not ok, or a redirect
resolved to a blocked URL — the fetch response body was left unconsumed
and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP
socket open instead of returning it to the connection pool, allowing an
attacker-controlled origin to exhaust file descriptors and cause a
denial of service. The body is now cancelled on all early-rejection
paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`,
and `fetchWithValidatedRedirects` cancels each redirect hop's body
before following or rejecting the next hop.

## @ai-sdk/quiverai@2.0.0-canary.5

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/react@4.0.0-canary.175

### Patch Changes

- 555c5de: fix(react): deny MCP App tool calls by default when
allowedTools is omitted

`experimental_MCPAppRenderer`'s bridge only enforced the `allowedTools`
allowlist when it was non-null, so omitting `allowedTools` skipped the
check and forwarded every `tools/call` from the (untrusted) MCP App
iframe to the host's `callTool`. A malicious or compromised MCP server
could therefore invoke any tool the host wired up.

Tool invocation from MCP App content is now deny-by-default: if
`allowedTools` is not explicitly provided, all `tools/call` requests are
rejected. To expose tools to an app, list them in
`handlers.allowedTools`.

-   Updated dependencies [2a150f8]

-   Updated dependencies [b44b051]

-   Updated dependencies [aeda373]

-   Updated dependencies [25a64f8]

-   Updated dependencies [375fdd7]

-   Updated dependencies [f18b08f]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/mcp@2.0.0-canary.63
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/replicate@3.0.0-canary.50

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/revai@3.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/rsc@3.0.0-canary.173

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/sandbox-just-bash@1.0.0-canary.7

### Patch Changes

- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/sandbox-vercel@1.0.0-canary.7

### Patch Changes

- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/svelte@5.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/togetherai@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/tui@1.0.0-canary.7

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/valibot@3.0.0-canary.48

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/vercel@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/voyage@2.0.0-canary.23

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/vue@4.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/workflow@1.0.0-canary.89

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/xai@4.0.0-canary.74

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/vue@3.0.203

Toggle @ai-sdk/vue@3.0.203's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (vercel#16026)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to release-v6.0, this
PR will be updated.


# Releases
## ai@6.0.203

### Patch Changes

- f42aa79: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- 5291f7e: Harden stream text processing and middleware against
prototype pollution from stream part IDs.

- b4b575a: fix: redact server error details from UI message streams by
default

`streamText(...).toUIMessageStream()` and `createUIMessageStream`
defaulted their `onError` callback to `getErrorMessage`, which
serializes the raw error (`error.toString()` / `JSON.stringify(error)`)
into the client-facing `{ type: 'error', errorText }` chunk — and also
into `tool-output-error` parts. The documented default was `() => 'An
error occurred.'`, so applications relying on the documented behavior
were unknowingly streaming server exception details (internal hostnames,
paths, provider request data, validation inputs) to end users.

The default `onError` now returns the documented generic `'An error
occurred.'`. Raw error details are only emitted when the developer
explicitly supplies an `onError` handler. This also redacts
`tool-output-error` and invalid-tool-input error text by default; pass
an `onError` to surface richer messages.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/gateway@3.0.129

## @ai-sdk/alibaba@1.0.28

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/amazon-bedrock@4.0.117

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/anthropic@3.0.84
    -   @ai-sdk/openai@3.0.71

## @ai-sdk/angular@2.0.204

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/anthropic@3.0.84

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/anthropic-aws@1.0.6

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/anthropic@3.0.84

## @ai-sdk/assemblyai@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/azure@3.0.74

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/deepseek@2.0.38
    -   @ai-sdk/openai@3.0.71

## @ai-sdk/baseten@1.0.53

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/black-forest-labs@1.0.36

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/bytedance@1.0.17

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/cerebras@2.0.56

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/cohere@3.0.38

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/deepgram@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/deepinfra@2.0.54

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/deepseek@2.0.38

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/devtools@0.0.19

### Patch Changes

-   f27afa8: fix(devtools): secure devtools viewer api access

## @ai-sdk/elevenlabs@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/fal@2.0.36

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/fireworks@2.0.55

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/gateway@3.0.129

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/gladia@2.0.35

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/google@3.0.82

### Patch Changes

- 3258f22: fix(google): prevent prototype pollution when streaming tool
args

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/google-vertex@4.0.145

### Patch Changes

-   Updated dependencies [3258f22]
-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/google@3.0.82
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/anthropic@3.0.84
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/groq@3.0.41

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/huggingface@1.0.52

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/hume@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/klingai@3.0.20

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/langchain@2.0.210

### Patch Changes

-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   ai@6.0.203

## @ai-sdk/llamaindex@2.0.203

### Patch Changes

-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   ai@6.0.203

## @ai-sdk/lmnt@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/luma@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/mcp@1.0.49

### Patch Changes

-   3e8d9ba: fix(mcp): lock first sse endpoint received via event

- 4fa7354: fix(mcp): prevent prototype-named tools from bypassing the
`schemas` allowlist

When using `client.tools({ schemas })` to expose only an explicitly
allowed
subset of an MCP server's tools, the allowlist check used the `in`
operator,
which also matches inherited `Object.prototype` properties. A
server-advertised
tool named `constructor`, `toString`, `__proto__`, etc. would pass the
check
even though the developer never defined it in `schemas`, and was then
exposed to
the model and executable. The check now uses `Object.hasOwn`, so only
    explicitly defined tools are returned.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/mistral@3.0.39

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/moonshotai@2.0.25

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/open-responses@1.0.18

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/openai@3.0.71

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/openai-compatible@2.0.50

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/perplexity@3.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/prodia@1.0.34

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/provider-utils@4.0.29

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

- f42aa79: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

## @ai-sdk/quiverai@1.0.2

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/react@3.0.205

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/replicate@2.0.35

### Patch Changes

- bfa5864: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [bfa5864]

-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/revai@2.0.35

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/rsc@2.0.203

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/svelte@4.0.203

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/togetherai@2.0.55

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/valibot@2.0.30

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/vercel@2.0.52

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

## @ai-sdk/voyage@1.0.6

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29

## @ai-sdk/vue@3.0.203

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
-   Updated dependencies [5291f7e]
-   Updated dependencies [b4b575a]
    -   @ai-sdk/provider-utils@4.0.29
    -   ai@6.0.203

## @ai-sdk/xai@3.0.95

### Patch Changes

-   Updated dependencies [bfa5864]
-   Updated dependencies [f42aa79]
    -   @ai-sdk/provider-utils@4.0.29
    -   @ai-sdk/openai-compatible@2.0.50

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/vue@2.0.200

Toggle @ai-sdk/vue@2.0.200's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (vercel#16027)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to release-v5.0, this
PR will be updated.


# Releases
## ai@5.0.200

### Patch Changes

- eea9166: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- 15cf74f: Harden stream text processing and middleware against
prototype pollution from stream part IDs.

- 8ad6f80: fix: redact server error details from UI message streams by
default

`streamText(...).toUIMessageStream()` and `createUIMessageStream`
defaulted their `onError` callback to `getErrorMessage`, which
serializes the raw error (`error.toString()` / `JSON.stringify(error)`)
into the client-facing `{ type: 'error', errorText }` chunk — and also
into `tool-output-error` parts. The documented default was `() => 'An
error occurred.'`, so applications relying on the documented behavior
were unknowingly streaming server exception details (internal hostnames,
paths, provider request data, validation inputs) to end users.

The default `onError` now returns the documented generic `'An error
occurred.'`. Raw error details are only emitted when the developer
explicitly supplies an `onError` handler. This also redacts
`tool-output-error` and invalid-tool-input error text by default; pass
an `onError` to surface richer messages.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/gateway@2.0.99

## @ai-sdk/alibaba@0.0.12

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/amazon-bedrock@3.0.102

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/anthropic@2.0.82

## @ai-sdk/angular@1.0.200

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/anthropic@2.0.82

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/assemblyai@1.0.30

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/azure@2.0.111

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/deepseek@1.0.43
    -   @ai-sdk/openai@2.0.107

## @ai-sdk/baseten@0.0.23

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/black-forest-labs@0.0.15

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/cerebras@1.0.45

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/cohere@2.0.30

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/deepgram@1.0.29

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/deepinfra@1.0.43

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/deepseek@1.0.43

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/elevenlabs@1.0.29

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/fal@1.0.33

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/fireworks@1.0.41

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/gateway@2.0.99

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/gladia@1.0.28

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/google@2.0.75

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/google-vertex@3.0.142

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/google@2.0.75
    -   @ai-sdk/anthropic@2.0.82
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/groq@2.0.41

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/huggingface@0.0.23

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/hume@1.0.28

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/langchain@1.0.200

### Patch Changes

-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   ai@5.0.200

## @ai-sdk/llamaindex@1.0.200

### Patch Changes

-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   ai@5.0.200

## @ai-sdk/lmnt@1.0.28

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/luma@1.0.28

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/mcp@0.0.19

### Patch Changes

-   d872a7a: fix(mcp): lock first sse endpoint received via event

- f4cd468: fix(mcp): prevent prototype-named tools from bypassing the
`schemas` allowlist

When using `client.tools({ schemas })` to expo
10BC8
se only an explicitly
allowed
subset of an MCP server's tools, the allowlist check used the `in`
operator,
which also matches inherited `Object.prototype` properties. A
server-advertised
tool named `constructor`, `toString`, `__proto__`, etc. would pass the
check
even though the developer never defined it in `schemas`, and was then
exposed to
the model and executable. The check now uses `Object.hasOwn`, so only
    explicitly defined tools are returned.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/mistral@2.0.34

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/moonshotai@0.0.11

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/openai@2.0.107

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/openai-compatible@1.0.40

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/perplexity@2.0.31

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/prodia@0.0.10

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/provider-utils@3.0.26

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

- eea9166: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

## @ai-sdk/react@2.0.202

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/replicate@1.0.28

### Patch Changes

- 9f67efe: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [9f67efe]

-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/revai@1.0.28

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/rsc@1.0.202

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/svelte@3.0.200

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/togetherai@1.0.43

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/valibot@1.0.26

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26

## @ai-sdk/vercel@1.0.41

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

## @ai-sdk/vue@2.0.200

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
-   Updated dependencies [15cf74f]
-   Updated dependencies [8ad6f80]
    -   @ai-sdk/provider-utils@3.0.26
    -   ai@5.0.200

## @ai-sdk/xai@2.0.74

### Patch Changes

-   Updated dependencies [9f67efe]
-   Updated dependencies [eea9166]
    -   @ai-sdk/provider-utils@3.0.26
    -   @ai-sdk/openai-compatible@1.0.40

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@ai-sdk/voyage@2.0.0-canary.23

Toggle @ai-sdk/voyage@2.0.0-canary.23's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Version Packages (canary) (vercel#16024)

This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## ai@7.0.0-canary.172

### Patch Changes

-   25a64f8: Remove deprecated experimental generateImage exports.

- 375fdd7: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- f18b08f: fix: redact server error details from UI message streams by
default

`toUIMessageStream`, `createUIMessageStream`, and `toUIMessageChunk`
defaulted their `onError` callback to `getErrorMessage`, which
serializes the raw error (`error.toString()` / `JSON.stringify(error)`)
into the client-facing `{ type: 'error', errorText }` chunk — and also
into `tool-output-error` parts. The documented default was `() => 'An
error occurred.'`, so applications relying on the documented behavior
were unknowingly streaming server exception details (internal hostnames,
paths, provider request data, validation inputs) to end users.

The default `onError` now returns the documented generic `'An error
occurred.'`. Raw error details are only emitted when the developer
explicitly supplies an `onError` handler. This also redacts
`tool-output-error` and invalid-tool-input error text by default; pass
an `onError` to surface richer messages.

- b4507d5: fix(provider-utils): cancel response body on download
rejection to prevent socket leak

When a download was rejected early — because the `Content-Length` header
exceeded the size limit, the response status was not ok, or a redirect
resolved to a blocked URL — the fetch response body was left unconsumed
and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP
socket open instead of returning it to the connection pool, allowing an
attacker-controlled origin to exhaust file descriptors and cause a
denial of service. The body is now cancelled on all early-rejection
paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`,
and `fetchWithValidatedRedirects` cancels each redirect hop's body
before following or rejecting the next hop.

-   Updated dependencies [8c17bf8]

-   Updated dependencies [aeda373]

-   Updated dependencies [558777f]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/gateway@4.0.0-canary.104
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/alibaba@2.0.0-canary.59

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/amazon-bedrock@5.0.0-canary.84

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66
    -   @ai-sdk/openai@4.0.0-canary.73

## @ai-sdk/angular@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/anthropic@4.0.0-canary.66

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/anthropic-aws@1.0.0-canary.7

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66

## @ai-sdk/assemblyai@3.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/azure@4.0.0-canary.75

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/deepseek@3.0.0-canary.54
    -   @ai-sdk/openai@4.0.0-canary.73

## @ai-sdk/baseten@2.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/black-forest-labs@2.0.0-canary.50

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/bytedance@2.0.0-canary.51

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/cerebras@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/cohere@4.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/deepgram@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/deepinfra@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/deepseek@3.0.0-canary.54

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/devtools@1.0.0-canary.30

### Patch Changes

-   32ce45c: fix(devtools): secure devtools viewer api access
-   275674e: fix(devtools): validate viewer database paths

## @ai-sdk/elevenlabs@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/fal@3.0.0-canary.49

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/fireworks@3.0.0-canary.56

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/gateway@4.0.0-canary.104

### Patch Changes

- 8c17bf8: fix(gateway): surface provider warnings in embedding and
reranking responses
- 558777f: fix(gateway): accept deprecated warnings in image, speech,
transcription, and video responses
-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/gladia@3.0.0-canary.49

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/google@4.0.0-canary.81

### Patch Changes

- 5878b40: fix(google): prevent prototype pollution when streaming tool
args

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/google-vertex@5.0.0-canary.107

### Patch Changes

-   Updated dependencies [5878b40]
-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/google@4.0.0-canary.81
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/anthropic@4.0.0-canary.66
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/groq@4.0.0-canary.53

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness@1.0.0-canary.7

### Patch Changes

- 3d87086: fix(harness): guard against invalid resuming a session vs
continuing a turn
- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/harness-claude-code@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness-codex@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/harness-pi@1.0.0-canary.3

### Patch Changes

- 1ea15a3: fix(harness): fix various bugs with harness skills not being
correctly processed by the harness adapters
- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/huggingface@2.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/hume@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/klingai@4.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/langchain@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/llamaindex@3.0.0-canary.172

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/lmnt@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/luma@3.0.0-canary.49

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/mcp@2.0.0-canary.63

### Patch Changes

-   2a150f8: fix(mcp): lock first sse endpoint received via event

- b44b051: fix(mcp): prevent prototype-named tools from bypassing the
`schemas` allowlist

When using `client.tools({ schemas })` to expose only an explicitly
allowed
subset of an MCP server's tools, the allowlist check used the `in`
operator,
which also matches inherited `Object.prototype` properties. A
server-advertised
tool named `constructor`, `toString`, `__proto__`, etc. would pass the
check
even though the developer never defined it in `schemas`, and was then
exposed to
the model and executable. The check now uses `Object.hasOwn`, so only
    explicitly defined tools are returned.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/mistral@4.0.0-canary.54

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/moonshotai@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/open-responses@2.0.0-canary.53

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/openai@4.0.0-canary.73

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/openai-compatible@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/otel@1.0.0-canary.118

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/perplexity@4.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/policy-opa@1.0.0-canary.9

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/prodia@2.0.0-canary.52

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/provider-utils@5.0.0-canary.48

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

- 375fdd7: fix: harden download URL SSRF guard against hostname and
redirect bypasses

`validateDownloadUrl` and the file download helpers (`downloadBlob`,
`download`) could be bypassed in several ways when handling untrusted
URLs:

- A fully-qualified hostname with a trailing dot (e.g. `localhost.`,
`myhost.local.`) skipped the localhost/`.local` blocklist.
- IPv6 addresses that embed an IPv4 address in their last 32 bits —
IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`),
and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48`
local-use prefix) — were not decoded and checked against the private
IPv4 ranges.
- Redirects were validated only _after_ `fetch` had already followed
them, so the request to a redirect target (e.g. an internal/metadata
address) had already been issued before the check ran.
- Several reserved/internal address ranges were not blocked: CGNAT
(`100.64.0.0/10`, used by some cloud providers for internal traffic),
benchmarking (`198.18.0.0/15`), IETF protocol assignments
(`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the
`255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`)
and multicast (`ff00::/8`).

The validator now strips trailing dots before the hostname checks and
fully expands IPv6 addresses to detect embedded private IPv4 targets.
The download helpers now follow redirects manually (`redirect:
'manual'`), re-validating each hop before requesting it, so an unsafe
redirect target is never fetched. When a redirect cannot be inspected
because the runtime returns an opaque response, the helpers fail closed
(reject the redirect) on the server; only in a real browser — where SSRF
is not reachable (fetch is constrained by CORS and cannot reach a
server's internal network or cloud-metadata endpoints) — is the redirect
followed natively so legitimate redirected downloads keep working.

- b4507d5: fix(provider-utils): cancel response body on download
rejection to prevent socket leak

When a download was rejected early — because the `Content-Length` header
exceeded the size limit, the response status was not ok, or a redirect
resolved to a blocked URL — the fetch response body was left unconsumed
and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP
socket open instead of returning it to the connection pool, allowing an
attacker-controlled origin to exhaust file descriptors and cause a
denial of service. The body is now cancelled on all early-rejection
paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`,
and `fetchWithValidatedRedirects` cancels each redirect hop's body
before following or rejecting the next hop.

## @ai-sdk/quiverai@2.0.0-canary.5

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/react@4.0.0-canary.175

### Patch Changes

- 555c5de: fix(react): deny MCP App tool calls by default when
allowedTools is omitted

`experimental_MCPAppRenderer`'s bridge only enforced the `allowedTools`
allowlist when it was non-null, so omitting `allowedTools` skipped the
check and forwarded every `tools/call` from the (untrusted) MCP App
iframe to the host's `callTool`. A malicious or compromised MCP server
could therefore invoke any tool the host wired up.

Tool invocation from MCP App content is now deny-by-default: if
`allowedTools` is not explicitly provided, all `tools/call` requests are
rejected. To expose tools to an app, list them in
`handlers.allowedTools`.

-   Updated dependencies [2a150f8]

-   Updated dependencies [b44b051]

-   Updated dependencies [aeda373]

-   Updated dependencies [25a64f8]

-   Updated dependencies [375fdd7]

-   Updated dependencies [f18b08f]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/mcp@2.0.0-canary.63
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/replicate@3.0.0-canary.50

### Patch Changes

- aeda373: fix: only send provider credentials to same-origin
response-supplied URLs

Several provider clients followed a URL taken from the provider's API
response (a polling/status URL or a final media URL such as
`polling_url`, `urls.get`, `result_url`, `result.sample`, or
`video.uri`) and reused the authenticated headers — or appended
`?key=<API_KEY>` — on that request. Because the host of the
response-supplied URL was never validated, the long-lived API key was
sent to whatever host the response named (a CDN in the benign case, or
an attacker-chosen host if the provider response was tampered with),
allowing credential exfiltration.

A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and
the affected fetches in `@ai-sdk/black-forest-labs`,
`@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`,
`@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the
followed URL is same-origin with the provider's configured API origin.
Requests to a foreign origin are made without the credential.

-   Updated dependencies [aeda373]

-   Updated dependencies [375fdd7]

-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/revai@3.0.0-canary.50

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/rsc@3.0.0-canary.173

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/sandbox-just-bash@1.0.0-canary.7

### Patch Changes

- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/sandbox-vercel@1.0.0-canary.7

### Patch Changes

- e551763: fix(harness): avoid using peer dependencies for underlying
harness and sandbox SDKs
-   Updated dependencies [3d87086]
-   Updated dependencies [aeda373]
-   Updated dependencies [1ea15a3]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/harness@1.0.0-canary.7
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/svelte@5.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/togetherai@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/tui@1.0.0-canary.7

### Patch Changes

-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   ai@7.0.0-canary.172

## @ai-sdk/valibot@3.0.0-canary.48

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/vercel@3.0.0-canary.56

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

## @ai-sdk/voyage@2.0.0-canary.23

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48

## @ai-sdk/vue@4.0.0-canary.172

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/workflow@1.0.0-canary.89

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [25a64f8]
-   Updated dependencies [375fdd7]
-   Updated dependencies [f18b08f]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   ai@7.0.0-canary.172

## @ai-sdk/xai@4.0.0-canary.74

### Patch Changes

-   Updated dependencies [aeda373]
-   Updated dependencies [375fdd7]
-   Updated dependencies [b4507d5]
    -   @ai-sdk/provider-utils@5.0.0-canary.48
    -   @ai-sdk/openai-compatible@3.0.0-canary.56

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
0