diff --git a/.changeset/sweet-kiwis-clean.md b/.changeset/sweet-kiwis-clean.md new file mode 100644 index 00000000000..88fd8b73662 --- /dev/null +++ b/.changeset/sweet-kiwis-clean.md @@ -0,0 +1,5 @@ +--- +'@ai-sdk/react': patch +--- + +fix (ai/react): include fetch parameter as part of useChat diff --git a/packages/react/src/use-chat.ts b/packages/react/src/use-chat.ts index fd03b97e66e..5bdac0d0788 100644 --- a/packages/react/src/use-chat.ts +++ b/packages/react/src/use-chat.ts @@ -196,6 +196,7 @@ export function useChat({ headers, body, generateId = generateIdFunc, + fetch, }: UseChatOptions & { key?: string; @@ -405,6 +406,7 @@ By default, it's set to 0, which will disable the feature. messagesRef, abortControllerRef, generateId, + fetch, ], );