mastra-ai/mastra · error · Error
Target type '${targetType}' not yet supported.
Error message
Target type '${targetType}' not yet supported. What it means
executeTarget dispatches on the experiment target's type; 'processor' targets were dropped from the roadmap and are explicitly rejected. The error is thrown synchronously before any execution happens, so no experiment items are run.
Source
Thrown at packages/core/src/datasets/experiment/executor.ts:165
target as Agent,
item,
signal,
options?.requestContext,
options?.experimentId,
options?.versions,
options?.toolMocks,
options?.unmockedToolPolicy,
);
break;
case 'workflow':
executionPromise = executeWorkflow(target as Workflow, item, options?.requestContext);
break;
case 'scorer':
executionPromise = executeScorer(target as MastraScorer<any, any, any, any>, item);
break;
case 'processor':
// Processor targets dropped from roadmap - not a core use case
throw new Error(`Target type '${targetType}' not yet supported.`);
default:
throw new Error(`Unknown target type: ${targetType}`);
}
// Race execution against signal abort (ensures timeout works even if target ignores signal)
if (signal) {
return await raceWithSignal(executionPromise, signal);
}
return await executionPromise;
} catch (error) {
return {
output: null,
error: {
message: error instanceof Error ? error.message : String(error),
stack: error instanceof Error ? error.stack : undefined,
},
traceId: null,View on GitHub (pinned to 75dd419e61)
Solutions
- Change the target type to a supported one ('agent', 'tool', 'workflow', or 'scorer')
- Wrap the processor logic in a tool or scorer and target that instead
- Remove the processor experiment config and re-create it against a supported target
Example fix
// before
runExperiment({ targetType: 'processor', targetId: 'redact-pii' });
// after
runExperiment({ targetType: 'tool', targetId: 'redact-pii-tool' }); Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = ['agent', 'tool', 'workflow', 'scorer'] as const;
if (!SUPPORTED.includes(targetType)) {
throw new Error(`Unsupported targetType for experiments: ${targetType}`);
} Type guard
type SupportedTargetType = 'agent' | 'tool' | 'workflow' | 'scorer';
function isSupportedTargetType(t: string): t is SupportedTargetType {
return ['agent', 'tool', 'workflow', 'scorer'].includes(t);
} Try / catch
try {
await runExperiment(config);
} catch (err) {
if (err instanceof Error && err.message.includes("not yet supported")) {
// replace processor target with a tool/scorer equivalent
} else throw err;
} Prevention
- Type configs as SupportedTargetType instead of string
- Grep configs for 'processor' targets when upgrading @mastra/core
- Wrap processor logic in a tool or scorer if you need that behavior
- Check the changelog for dropped target types before upgrading
When it happens
Trigger: Configuring an experiment with targetType 'processor' (e.g. runExperiment({ targetType: 'processor', targetId: ... }) or a stored target referencing a processor).
Common situations: Copying an experiment config from an older codebase/docs where processor targets were supported; migrating experiments after the roadmap change and leaving the old target type in place.
Related errors
- Unknown target type: ${targetType}
- No data source: provide datasetId or data
- Target not found: ${targetType}/${targetId}
- No task: provide targetType+targetId or task
- Async buffering is not yet supported with scope: 'resource'.
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/95e7007b539a4d4b.
Report an issue: GitHub.