{"record":{"id":"6ac7bf979e8c7c15","repo":"mastra-ai/mastra","slug":"processor-does-not-support-inputstep-phase","errorCode":null,"errorMessage":"Processor does not support inputStep phase","messagePattern":"Processor does not support inputStep phase","errorType":"validation","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"packages/server/src/server/handlers/processors.ts","lineNumber":418,"sourceCode":"\n      try {\n        let result: any;\n\n        // Execute the specific phase method on the individual processor\n        switch (phase) {\n          case 'input':\n            if (!processor.processInput) {\n              throw new HTTPException(400, { message: 'Processor does not support input phase' });\n            }\n            result = await processor.processInput({\n              ...baseContext,\n              systemMessages: [],\n            });\n            break;\n\n          case 'inputStep':\n            if (!processor.processInputStep) {\n              throw new HTTPException(400, { message: 'Processor does not support inputStep phase' });\n            }\n            result = await processor.processInputStep({\n              ...baseContext,\n              systemMessages: [],\n              stepNumber: 0,\n              steps: [],\n              // Pass empty/default values for all inputStep fields\n              model: '' as any,\n              tools: {},\n              toolChoice: undefined,\n              activeTools: [],\n              providerOptions: undefined,\n              modelSettings: undefined,\n              structuredOutput: undefined,\n            });\n            break;\n\n          case 'outputResult':","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/processors.ts#L400-L436","documentation":"Same dispatch pattern as the input phase, but for 'inputStep': if the processor does not implement processInputStep, the server throws HTTP 400. inputStep is an agentic-loop hook (per model step), so most simple processors do not implement it.","triggerScenarios":"Executing phase='inputStep' against a processor without a processInputStep method via the processor execute handler in packages/server/src/server/handlers/processors.ts.","commonSituations":"Testing step-level hooks on plain transformers; UIs that blanket-execute every phase; assuming all Processor classes implement the full step lifecycle.","solutions":["Execute a phase implemented by this processor (e.g. 'input' or 'output').","Add a processInputStep method to the processor if per-step interception is required.","Gate the phase selector on the processor's declared supported phases."],"exampleFix":"// before\nawait executeProcessor(id, 'inputStep', context);\n// after\nif (typeof processor.processInputStep === 'function') {\n  await executeProcessor(id, 'inputStep', context);\n}","handlingStrategy":"validation","validationCode":"if (phase === 'inputStep' && typeof processorRef.processInputStep !== 'function') {\n  throw new Error('Processor does not implement processInputStep');\n}","typeGuard":"function supportsInputStep(p: any): p is { processInputStep: Function } {\n  return typeof p?.processInputStep === 'function';\n}","tryCatchPattern":"try {\n  await exec(id, 'inputStep', ctx);\n} catch (e) {\n  if (e instanceof HTTPException && e.status === 400 && e.message.includes('inputStep')) {\n    console.warn(`${id} lacks inputStep; skipping`);\n    return null;\n  }\n  throw e;\n}","preventionTips":["Only invoke step-level phases on processors written for the agentic loop.","Keep a manifest of processor capabilities alongside registrations.","Validate requested phases against the route schema before calling the API."],"tags":["http-400","processors","phase-not-supported"],"backgroundTag":"processor-phase-not-supported","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}