OpenAI Deep Research tool requirements
In order to use openAI deep research you have to call tools like this:
Is this possible with convex agent? AI says it is NOT.
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
I assume you would just create a deep research tool for your convex agent (either with createTool if u need convex ctx or just tool if udont), and then inside the tool where you call the llm you just follow the ai sdk docs: https://ai-sdk.dev/providers/ai-sdk-providers/openai#web-search-tool
const result = await generateText({
model: openai('gpt-5'),
prompt: 'What happened in San Francisco last week?',
tools: {
web_search: openai.tools.webSearch({
// optional configuration:
searchContextSize: 'high',
userLocation: {
type: 'approximate',
city: 'San Francisco',
region: 'California',
},
}),
},
// Force web search tool (optional):
toolChoice: { type: 'tool', toolName: 'web_search' },
});
OpenAI
Learn how to use the OpenAI provider for the AI SDK.