@ai-sdk/gateway
4.0.150 · 18 Nov 2026Apache-2.047.3M / weekRepositoryHomepagenpmAtom feed
Upgrading @ai-sdk/gateway From 3.0.232 to 4.0.139
140 releases in betweenevery note read
- 6
- changes to make
- 0
- advisories fixed
- 70
- new
- 52
- fixes
Before you upgrade
Tick each one off as you go- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Deprecated4.0.122
- Deprecated3.0.235
Security
- 4.0.9
Prevent prototype pollution when synchronously parsing provider JSON inputs and expose
secureJsonParsefrom provider-utils.
Release by release
- New
provider/gateway: Type the headquarters provider option
- New
4.0.137 – 4.0.1382 releases, nothing new or fixed in the notes
- New
Add opt-in streaming decoding of large generated images to reduce peak memory.
- New
Add marketCost, surchargeCost, and gatewayCost fields to getGenerationInfo() results, surfacing the corresponding fields from the AI Gateway generation lookup API.
- Fixed
Preserve optional normalized word timings returned by transcription responses and warn when shared timestampGranularities requests are not forwarded by the gateway adapter.
- Fixed
Accept explicit uploaded-video outcomes in video generation and status responses.
- Fixed
Pass through
seed: 0instead of dropping it in image and video models. KlingAI now reportsseed: 0as an unsupported setting like any other seed. - Fixed
Feat (provider/gateway): implement server-side realtime connection descriptors
- New
4.0.134 – 4.0.1352 releases, nothing new or fixed in the notes
- New
provider/gateway: Add DeepSeek Search and Fetch tools
- New
4.0.132nothing new or fixed in the note
- New
Support promises and synchronous or asynchronous callbacks in provider API key and token settings. Resolve credentials per authenticated request while preserving existing authentication behavior and synchronous credential serialization.
- New
- Fixed
gateway: Preserve AbortError and TimeoutError cancellation reasons instead of wrapping them in retryable GatewayResponseError errors with status 500. Propagate these errors from speech and transcription input streams to their output streams without leaving reads pending or causing unhandled rejections.
- Fixed
160 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.