feat(open-responses): support experimental extension codecs (#18900)
## Summary Adds an experimental extension registry to `@ai-sdk/open-responses` for namespaced tools, response items, and streaming events. Each codec can opt into tool, item, and event handling independently through `experimental_extensions`. Registered provider tools are encoded into requests, decoded calls and events set execution ownership per result, and unsupported tools continue to produce warnings. Invalid provider-tool choices are omitted instead of referencing a tool that was not sent. Decoded items retain their original wire representation in one replay carrier. This keeps opaque fields intact across `generateText` history, including items that decode only to source parts, without copying the full payload onto every decoded part. Models with callback-based extension codecs reject workflow serialization because the callbacks cannot cross workflow boundaries. Cross-package coverage lives in the private `tools/integration-tests` workspace. Neither `ai` nor `@ai-sdk/open-responses` declares a dependency or devDependency on the other. ## Example Adds a mocked `generateText` example that registers a document-search extension and demonstrates tool encoding, provider execution, and multi-turn replay of source and receipt items. ## Tests - Open Responses Node and Edge suites: 102 tests each - Neutral Open Responses/core integration suite: Node and Edge - Remaining `ai` provider-error integration suite: Node and Edge - Full repository type check and formatting/lint checks Fixes #18899 --------- Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: me2seeks <96464454+me2seeks@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
A
ai-sdk-factory[bot] committed
9a68261a26c07c09722b9670b008bec192dacbc0
Parent: 5d2229e
Committed by GitHub <noreply@github.com>
on 8/27/2026, 7:49:54 PM