mastra-ai/mastra · error
AISDKv5 chunk type "reasoning-signature" not supported
Error message
AISDKv5 chunk type "reasoning-signature" not supported
What it means
The AI SDK v5 wire format has no representation for 'reasoning-signature' chunks (and 'redacted-reasoning'), so convertMastraChunkToAISDKv5 throws instead of dropping provider signature data silently. This surfaces during streaming conversion when a model emits reasoning signature payloads.
Source
Thrown at packages/core/src/stream/aisdk/v5/transform.ts:474
// Cast needed: Mastra's LanguageModelUsage has optional properties, V2 has required-but-nullable
totalUsage: chunk.payload.output.usage as LanguageModelV2Usage,
};
}
case 'reasoning-start':
return {
type: 'reasoning-start',
id: chunk.payload.id,
providerMetadata: chunk.payload.providerMetadata,
};
case 'reasoning-delta':
return {
type: 'reasoning-delta',
id: chunk.payload.id,
text: chunk.payload.text,
providerMetadata: chunk.payload.providerMetadata,
};
case 'reasoning-signature':
throw new Error('AISDKv5 chunk type "reasoning-signature" not supported');
case 'redacted-reasoning':
throw new Error('AISDKv5 chunk type "redacted-reasoning" not supported');
case 'reasoning-end':
return {
type: 'reasoning-end',
id: chunk.payload.id,
providerMetadata: chunk.payload.providerMetadata,
};
case 'source':
if (chunk.payload.sourceType === 'url') {
return {
type: 'source',
sourceType: 'url',
id: chunk.payload.id,
url: chunk.payload.url!,
title: chunk.payload.title,
providerMetadata: chunk.payload.providerMetadata,View on GitHub (pinned to 75dd419e61)
Solutions
- Upgrade @mastra/core to a version where reasoning-signature chunks are handled/supported in the v5 conversion
- Disable reasoning/signature output for the model if you don't need it (e.g. omit reasoning options)
- Filter 'reasoning-signature' chunks out in stream middleware before conversion
- Catch the error per-stream and fall back to a non-v5 (native Mastra) stream consumer
Example fix
// before const stream = agent.stream(...).toAISDKv5Stream(); // crashes on signature chunks // after const stream = agent.stream(...).fullStream.pipe( filter(chunk => chunk.type !== 'reasoning-signature' && chunk.type !== 'redacted-reasoning') ); // then convert
Defensive patterns
Strategy: try-catch
Type guard
function isUnsupportedInV5(chunk: MastraChunk): boolean {
return chunk.type === 'reasoning-signature' || chunk.type === 'redacted-reasoning';
} Try / catch
try {
result = convertMastraChunkToAISDKv5(chunk);
} catch (e) {
if (String(e).includes('reasoning-signature')) {
logger.debug('Dropping reasoning-signature chunk (unsupported in AISDK v5)');
return null; // skip chunk
}
throw e;
} Prevention
- Filter out reasoning-signature/redacted-reasoning chunks before v5 conversion
- Upgrade @mastra/core to a release that supports these chunk types if you need signatures
- Disable provider reasoning signature output when the consumer doesn't use it
- Test streaming with your reasoning-enabled models before deploying upgrades
When it happens
Trigger: Streaming from a model that emits reasoning-signature chunks (e.g. OpenAI o-series/Anthropic extended thinking signature payloads) through the AISDKv5 conversion path in an environment where that chunk type is not supported.
Common situations: Using reasoning-enabled models with the v5 compat stream; upgrading a provider package that started emitting signature chunks; replaying stored traces containing signature chunks.
Related errors
- Unknown chunk type: ${exhaustiveCheck}
- AISDKv5 chunk type "redacted-reasoning" not supported
- UI Messages require a data property when using data- prefixe
- UI Messages require a data property when using data- prefixe
- UI Messages require a data property when using data- prefixe
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/ee7120657ee1c639.
Report an issue: GitHub.