vercel/ai · error · Error
Unsupported role: ${_exhaustiveCheck}
Error message
Unsupported role: ${_exhaustiveCheck} What it means
Error "Unsupported role: ${_exhaustiveCheck}" thrown in vercel/ai.
Source
Thrown at packages/groq/src/convert-to-groq-chat-messages.ts:157
case 'content':
case 'json':
case 'error-json':
contentValue = JSON.stringify(output.value);
break;
}
messages.push({
role: 'tool',
tool_call_id: toolResponse.toolCallId,
content: contentValue,
});
}
break;
}
default: {
const _exhaustiveCheck: never = role;
throw new Error(`Unsupported role: ${_exhaustiveCheck}`);
}
}
}
return messages;
}
View on GitHub (pinned to 69428b1f8b)
When it happens
Trigger: Thrown at packages/groq/src/convert-to-groq-chat-messages.ts:157 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/15a9b2070c4fe73c.
Report an issue: GitHub.