The meta.ai doc notes that search grounding is available, and shows how to do it in one of its example recipes.
I'm having trouble understanding how I would set that up via the ai-sdk'sgenerateText method. I am using the Vercel AI Gateway as well, if that matters. What would I pass as the tools argument? Or do I need to pass something like provider specific options (e.g. using a meta key with config object)?
I did see that the Meta Model API is "drop-in compatible with the OpenAI SDK" (in the Meta doc here), so I did try something like this:
import { openai } from '@ai-sdk/openai';
...
generateText({ model: "meta/muse-spark-1.1", prompt: "...", ... tools: { web_search: openai.tools.webSearch() }});That did seem to work, but I wasn't quite sure if using the openai.tools.webSearch call was correct here for the meta model and I don't want to do something that is not documented as working but happens to work coincidentally.
Any guidance would be appreciated.