-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Description
Description
I get the error AI SDK Warning (huggingface.responses / deepseek-ai/DeepSeek-V3-0324): The feature "tool messages" is not supported. when I try to use a tool, but the documentaton of @ai-sdk/huggingface says that DeepSeek-V3-0324 supports tools and also the hugging face documentation says that DeepSeek-V3-0324 supports tools, at least with this providers: novita, sambanova, together and fireworks-ai, this is my code:
import { huggingface } from "@ai-sdk/huggingface";
import { stepCountIs, streamText, tool } from "ai";
import z from "zod";
export async function POST() {
const { textStream } = await streamText({
model: huggingface("deepseek-ai/DeepSeek-V3-0324"),
prompt: "What is the weather in Montevideo, Uruguay?",
stopWhen: stepCountIs(5),
tools: {
weather: tool({
description: "Get the weather in a location",
inputSchema: z.object({
location: z.string().describe("The location to get the weather for"),
}),
execute: async ({ location }) => ({
location,
temperature: 72 + Math.floor(Math.random() * 21) - 10,
}),
}),
},
onError({ error }) {
console.error(error);
},
});
for await (const textPart of textStream) {
console.log(textPart);
}
return new Response("Test");
}I tried using the model with the provider novita, like this deepseek-ai/DeepSeek-V3-0324:novita, but it gave me the same error
AI SDK Version
- ai: 6.0.0-beta.127
- @ai-sdk/huggingface: 1.0.0-beta.37
Code of Conduct
- I agree to follow this project's Code of Conduct