Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. Your keys stay in this tab. They are never sent to Wirestack or saved; we only count that the panel was used.
@ai-sdk/gateway 4.0.153, released November 23, 2026 and included in ai 7.0.180, fixes a credential exposure found by Vercel Security.
If you pass request-scoped keys in providerOptions.gateway.byok and a Gateway request fails with an HTTP error, the failed request body could reach your telemetry integrations through onError, with the keys in it. It could also appear in the request.body metadata sent to telemetry.
From 4.0.153, telemetry copies show [redacted] for every value under providerOptions.gateway.byok. The request sent to the Gateway and the error your application receives are unchanged, so the error object in your own code still holds the key.
The fix is partial. The pull request says onStart and onStepStart telemetry events still include providerOptions as passed, so a telemetry integration that records those events can still see BYOK values.
Prerequisites
A project that uses AI SDK 7 with AI Gateway, a key in AI_GATEWAY_API_KEY, and BYOK keys passed per request
A telemetry integration that records errors or start events
Steps
Upgrade:
Shell
npm install ai@7.0.180 @ai-sdk/gateway@4.0.153
Check what your telemetry integration does with onStart and onStepStart. Do not store or forward providerOptions from those events.
Do not log the full error object from a failed Gateway call in your own code, since it still contains the request body.
Search your telemetry store for BYOK values from failed requests. If any are there, rotate those provider keys.
Test it
Send a request with a fake BYOK key through a fetch that returns HTTP 400, with a telemetry integration that has onError. The error passed to onError should not contain the fake key.
Not confirmed
The AI SDK 6 and 5 lines (@ai-sdk/gateway 3.0.243 and 2.0.185, the newest on those tags) do not contain this redaction code. The release notes do not say whether those lines are affected or will get a fix.
Vercel has not published a security advisory or a list of affected versions for this finding.