Vercel AI SDK
Use the Vercel AI SDK with Boundless through the OpenAI-compatible provider: install, base URL and key, streaming and a tool call.
The Vercel AI SDK reaches Boundless through @ai-sdk/openai-compatible, which speaks chat completions.
Install#
Base URL and key#
Name a model with the ID from the models table: boundless("deepseek/deepseek-v4.1-flash-1017").
Make a request#
Stream the reply#
Call a tool#
The SDK runs execute, sends the result back and asks the model for the final answer. Tool calling shows the same loop on the raw API.
Known differences#
- Keep
@ai-sdk/openai-compatibleon the same AI SDK major version asai. The tool example uses theinputSchemaandstopWhennames of AI SDK 5 and later. - The provider speaks chat completions. Messages and Responses are not used.
- Not every model supports tools.
GET /v1/model/infolists the capability flags. - Credits that run out return
402withbudget_exceeded. Rate limits return429. See Errors. - A reasoning model spends
max_tokenson thinking too. See Reasoning.