{"record":{"id":"ee7120657ee1c639","repo":"mastra-ai/mastra","slug":"aisdkv5-chunk-type-reasoning-signature-not-suppo","errorCode":null,"errorMessage":"AISDKv5 chunk type \"reasoning-signature\" not supported","messagePattern":"AISDKv5 chunk type \"reasoning-signature\" not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/stream/aisdk/v5/transform.ts","lineNumber":474,"sourceCode":"        // Cast needed: Mastra's LanguageModelUsage has optional properties, V2 has required-but-nullable\n        totalUsage: chunk.payload.output.usage as LanguageModelV2Usage,\n      };\n    }\n    case 'reasoning-start':\n      return {\n        type: 'reasoning-start',\n        id: chunk.payload.id,\n        providerMetadata: chunk.payload.providerMetadata,\n      };\n    case 'reasoning-delta':\n      return {\n        type: 'reasoning-delta',\n        id: chunk.payload.id,\n        text: chunk.payload.text,\n        providerMetadata: chunk.payload.providerMetadata,\n      };\n    case 'reasoning-signature':\n      throw new Error('AISDKv5 chunk type \"reasoning-signature\" not supported');\n    case 'redacted-reasoning':\n      throw new Error('AISDKv5 chunk type \"redacted-reasoning\" not supported');\n\n    case 'reasoning-end':\n      return {\n        type: 'reasoning-end',\n        id: chunk.payload.id,\n        providerMetadata: chunk.payload.providerMetadata,\n      };\n    case 'source':\n      if (chunk.payload.sourceType === 'url') {\n        return {\n          type: 'source',\n          sourceType: 'url',\n          id: chunk.payload.id,\n          url: chunk.payload.url!,\n          title: chunk.payload.title,\n          providerMetadata: chunk.payload.providerMetadata,","sourceCodeStart":456,"sourceCodeEnd":492,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/stream/aisdk/v5/transform.ts#L456-L492","documentation":"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.","triggerScenarios":"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.","commonSituations":"Using reasoning-enabled models with the v5 compat stream; upgrading a provider package that started emitting signature chunks; replaying stored traces containing signature chunks.","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"],"exampleFix":"// before\nconst stream = agent.stream(...).toAISDKv5Stream(); // crashes on signature chunks\n// after\nconst stream = agent.stream(...).fullStream.pipe(\n  filter(chunk => chunk.type !== 'reasoning-signature' && chunk.type !== 'redacted-reasoning')\n); // then convert\n","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isUnsupportedInV5(chunk: MastraChunk): boolean {\n  return chunk.type === 'reasoning-signature' || chunk.type === 'redacted-reasoning';\n}","tryCatchPattern":"try {\n  result = convertMastraChunkToAISDKv5(chunk);\n} catch (e) {\n  if (String(e).includes('reasoning-signature')) {\n    logger.debug('Dropping reasoning-signature chunk (unsupported in AISDK v5)');\n    return null; // skip chunk\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["streaming","reasoning","aisdk","unsupported"],"backgroundTag":"unsupported-reasoning-chunk","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}