Skip to content

Commit 5185bce

Browse files
authored
chore (ui/solid): deprecate ai-sdk/solid (#5361)
1 parent 9ca29c5 commit 5185bce

File tree

8 files changed

+34
-15
lines changed

8 files changed

+34
-15
lines changed

.changeset/tame-deers-thank.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@ai-sdk/solid': patch
3+
---
4+
5+
chore (ui/solid): deprecate ai-sdk/solid

content/docs/04-ai-sdk-ui/01-overview.mdx

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ These hooks are designed to reduce the complexity and time required to implement
1818

1919
## UI Framework Support
2020

21-
AI SDK UI supports the following frameworks: [React](https://react.dev/), [Svelte](https://svelte.dev/), [Vue.js](https://vuejs.org/), and [SolidJS](https://www.solidjs.com/).
21+
AI SDK UI supports the following frameworks: [React](https://react.dev/), [Svelte](https://svelte.dev/), [Vue.js](https://vuejs.org/), and [SolidJS](https://www.solidjs.com/) (deprecated).
2222
Here is a comparison of the supported functions across these frameworks:
2323

24-
| Function | React | Svelte | Vue.js | SolidJS |
25-
| --------------------------------------------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
26-
| [useChat](/docs/reference/ai-sdk-ui/use-chat) | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
27-
| [useCompletion](/docs/reference/ai-sdk-ui/use-completion) | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
28-
| [useObject](/docs/reference/ai-sdk-ui/use-object) | <Check size={18} /> | <Cross size={18} /> | <Cross size={18} /> | <Check size={18} /> |
29-
| [useAssistant](/docs/reference/ai-sdk-ui/use-assistant) | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
24+
| Function | React | Svelte | Vue.js | SolidJS (deprecated) |
25+
| --------------------------------------------------------- | ------------------- | ------------------------------------ | ------------------- | -------------------- |
26+
| [useChat](/docs/reference/ai-sdk-ui/use-chat) | <Check size={18} /> | <Check size={18} /> Chat | <Check size={18} /> | <Check size={18} /> |
27+
| [useCompletion](/docs/reference/ai-sdk-ui/use-completion) | <Check size={18} /> | <Check size={18} /> Completion | <Check size={18} /> | <Check size={18} /> |
28+
| [useObject](/docs/reference/ai-sdk-ui/use-object) | <Check size={18} /> | <Check size={18} /> StructuredObject | <Cross size={18} /> | <Check size={18} /> |
29+
| [useAssistant](/docs/reference/ai-sdk-ui/use-assistant) | <Check size={18} /> | <Cross size={18} /> | <Check size={18} /> | <Check size={18} /> |
3030

3131
<Note>
3232
[Contributions](https://github.com/vercel/ai/blob/main/CONTRIBUTING.md) are

content/docs/07-reference/02-ai-sdk-ui/index.mdx

+7-7
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ It also contains the following helper functions:
9393

9494
## UI Framework Support
9595

96-
AI SDK UI supports the following frameworks: [React](https://react.dev/), [Svelte](https://svelte.dev/), [Vue.js](https://vuejs.org/), and [SolidJS](https://www.solidjs.com/).
96+
AI SDK UI supports the following frameworks: [React](https://react.dev/), [Svelte](https://svelte.dev/), [Vue.js](https://vuejs.org/), and [SolidJS](https://www.solidjs.com/) (deprecated).
9797
Here is a comparison of the supported functions across these frameworks:
9898

99-
| Function | React | Svelte | Vue.js | SolidJS |
100-
| --------------------------------------------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
101-
| [useChat](/docs/reference/ai-sdk-ui/use-chat) | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
102-
| [useCompletion](/docs/reference/ai-sdk-ui/use-completion) | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
103-
| [useObject](/docs/reference/ai-sdk-ui/use-object) | <Check size={18} /> | <Cross size={18} /> | <Cross size={18} /> | <Check size={18} /> |
104-
| [useAssistant](/docs/reference/ai-sdk-ui/use-assistant) | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
99+
| Function | React | Svelte | Vue.js | SolidJS (deprecated) |
100+
| --------------------------------------------------------- | ------------------- | ------------------------------------ | ------------------- | -------------------- |
101+
| [useChat](/docs/reference/ai-sdk-ui/use-chat) | <Check size={18} /> | <Check size={18} /> Chat | <Check size={18} /> | <Check size={18} /> |
102+
| [useCompletion](/docs/reference/ai-sdk-ui/use-completion) | <Check size={18} /> | <Check size={18} /> Completion | <Check size={18} /> | <Check size={18} /> |
103+
| [useObject](/docs/reference/ai-sdk-ui/use-object) | <Check size={18} /> | <Check size={18} /> StructuredObject | <Cross size={18} /> | <Check size={18} /> |
104+
| [useAssistant](/docs/reference/ai-sdk-ui/use-assistant) | <Check size={18} /> | <Cross size={18} /> | <Check size={18} /> | <Check size={18} /> |
105105

106106
<Note>
107107
[Contributions](https://github.com/vercel/ai/blob/main/CONTRIBUTING.md) are

packages/solid/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# AI SDK: Solid.js provider
22

3+
> **Warning** `@ai-sdk/solid` has been deprecated and will be removed in AI SDK 5
4+
35
[Solid.js](https://www.solidjs.com/) UI components for the [AI SDK](https://sdk.vercel.ai/docs):
46

57
- [`useChat`](https://sdk.vercel.ai/docs/reference/ai-sdk-ui/use-chat) hook
68
- [`useCompletion`](https://sdk.vercel.ai/docs/reference/ai-sdk-ui/use-completion) hook
9+
- [`useObject`](https://sdk.vercel.ai/docs/reference/ai-sdk-ui/use-object) hook

packages/solid/src/use-assistant.ts

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ Abort the current request immediately, keep the generated tokens if any.
9292
error: Accessor<undefined | Error>;
9393
};
9494

95+
/**
96+
* @deprecated `@ai-sdk/solid` has been deprecated and will be removed in AI SDK 5.
97+
*/
9598
export function useAssistant(
9699
rawUseAssistantOptions: UseAssistantOptions | Accessor<UseAssistantOptions>,
97100
): UseAssistantHelpers {

packages/solid/src/use-chat.ts

+3
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ By default, it's set to 1, which means that only a single LLM call is made.
161161
}) => unknown;
162162
};
163163

164+
/**
165+
* @deprecated `@ai-sdk/solid` has been deprecated and will be removed in AI SDK 5.
166+
*/
164167
export function useChat(
165168
rawUseChatOptions: UseChatOptions | Accessor<UseChatOptions> = {},
166169
): UseChatHelpers {

packages/solid/src/use-completion.ts

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ or to provide a custom fetch implementation for e.g. testing.
7474

7575
const completionCache = new ReactiveLRU<string, string>();
7676

77+
/**
78+
* @deprecated `@ai-sdk/solid` has been deprecated and will be removed in AI SDK 5.
79+
*/
7780
export function useCompletion(
7881
rawUseCompletionOptions:
7982
| UseCompletionOptions

packages/solid/src/use-object.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ export type Experimental_UseObjectHelpers<RESULT, INPUT> = {
103103

104104
const objectCache = new ReactiveLRU<string, DeepPartial<any>>();
105105

106+
/**
107+
* @deprecated `@ai-sdk/solid` has been deprecated and will be removed in AI SDK 5.
108+
*/
106109
function useObject<RESULT, INPUT = any>(
107110
rawUseObjectOptions:
108111
| Experimental_UseObjectOptions<RESULT>
@@ -112,7 +115,6 @@ function useObject<RESULT, INPUT = any>(
112115
convertToAccessorOptions(rawUseObjectOptions),
113116
);
114117

115-
const api = createMemo(() => useObjectOptions().api?.() ?? '/api/object');
116118
// Generate an unique id for the completion if not provided.
117119
const idKey = createMemo(
118120
() => useObjectOptions().id?.() ?? `object-${createUniqueId()}`,

0 commit comments

Comments
 (0)