Next.js Discord

Discord Forum

Vercel AI SDK

Unanswered
Tibbs posted this in #help-forum
Open in Discord
Can anyone help me with creating tools and running them through multiple models please? I have a ai/tools.ts file and the api/chat/route.ts file which uses only one model currently, but I'd like to expand the models to multiple choices and then have whatever model is chosen to be able to run prompts through

4 Replies

if you're using vercel's ai sdk then it should be pretty easy
you just need to maintain a list of available models and find a way to send your model from client to your chat route
Here I am overcomplicating it lol
If I make a context for a model provider would that be overkill?