-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Description
Description
AI SDK Warning (xai.chat / grok-4): The feature "provider-defined tool code_execution" is not supported.
import { xai } from "@ai-sdk/xai";
import { streamText } from "ai";
const response = streamText({
model: xai.responses("grok-4"),
prompt:
"Call the web_search tool with the query 'What is the capital of France?'",
tools: {
web_search: xai.tools.webSearch(),
code_execution: xai.tools.codeExecution(),
},
});
for await (const chunk of response.fullStream) {
console.dir(chunk, { depth: null });
}AI SDK Version
No response
Code of Conduct
- I agree to follow this project's Code of Conduct