vercel/ai · error · UnsupportedFunctionalityError
'tool choice type: ${_exhaustiveCheck}' functionality not su
Error message
'tool choice type: ${_exhaustiveCheck}' functionality not supported. What it means
Error "'tool choice type: ${_exhaustiveCheck}' functionality not supported." thrown in vercel/ai.
Source
Thrown at packages/groq/src/groq-prepare-tools.ts:126
switch (type) {
case 'auto':
case 'none':
case 'required':
return { tools: groqTools, toolChoice: type, toolWarnings };
case 'tool':
return {
tools: groqTools,
toolChoice: {
type: 'function',
function: {
name: toolChoice.toolName,
},
},
toolWarnings,
};
default: {
const _exhaustiveCheck: never = type;
throw new UnsupportedFunctionalityError({
functionality: `tool choice type: ${_exhaustiveCheck}`,
});
}
}
}
View on GitHub (pinned to 69428b1f8b)
When it happens
Trigger: Thrown at packages/groq/src/groq-prepare-tools.ts:126 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/5b38fc060e661b30.
Report an issue: GitHub.