vercel/ai · error · UnsupportedFunctionalityError
Anthropic Message Batches cannot restore the custom provider
Error message
Anthropic Message Batches cannot restore the custom provider-tool name "${aliasedProviderTool.name}" when results are retrieved independently of the start call (request "${request.id}"). Use the provider's canonical tool name. What it means
Error "Anthropic Message Batches cannot restore the custom provider-tool name "${aliasedProviderTool.name}" when results are retrieved independently of the start call (request "${request.id}"). Use the provider's canonical tool name." thrown in vercel/ai.
Source
Thrown at packages/anthropic/src/anthropic-messages-batch.ts:244
stream: false,
userSuppliedBetas: new Set(explicitBatchBetas),
});
if (prepared.usesJsonResponseTool) {
throw new UnsupportedFunctionalityError({
functionality: 'batch responseFormat JSON-tool fallback',
message:
`Anthropic Message Batches cannot decode the JSON-tool structured-output fallback ` +
`(request "${request.id}") because batch results are retrieved independently of the start call. ` +
`Use a model that supports native output_format structured outputs.`,
});
}
const aliasedProviderTool = request.options.tools?.find(
tool =>
tool.type === 'provider' &&
prepared.toolNameMapping.toProviderToolName(tool.name) !== tool.name,
);
if (aliasedProviderTool != null) {
throw new UnsupportedFunctionalityError({
functionality: 'aliased provider tool names in batches',
message:
`Anthropic Message Batches cannot restore the custom provider-tool name ` +
`"${aliasedProviderTool.name}" when results are retrieved independently of the start call ` +
`(request "${request.id}"). Use the provider's canonical tool name.`,
});
}
const body = this.transformRequestBody(prepared.args, prepared.betas);
validateAnthropicBatchBody({
body,
requestId: request.id,
});
preparedRequests.push({ custom_id: request.id, params: body });
for (const beta of prepared.betas) {
batchBetas.add(beta);
}
for (const warning of prepared.warnings) {View on GitHub (pinned to 69428b1f8b)
When it happens
Trigger: Thrown at packages/anthropic/src/anthropic-messages-batch.ts:244 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/5675b1f00bd2c27b.
Report an issue: GitHub.