Skip to main content
Tool calling lets the model choose arguments for functions defined by your application. With tensormesh(modelId), AI SDK tool calls are sent through /v1/chat/completions.
Use toolChoice: "auto" for GPT OSS models. Use toolChoice: "required" when the selected model supports it and you want to force a tool call in a demo or test.

Responses API Tool Calls

The package also exposes raw /v1/responses helpers. When you call the Responses API directly, use the endpoint payload shape and include a boolean strict value for function tools. Responses API tool-calling support is model-dependent; lukealonso/GLM-5.1-NVFP4-MTP does not currently support tool calling through /v1/responses.