mastra-ai/mastra · error · Error
Subconscious observation extractor "${name}" shares the Obse
Error message
Subconscious observation extractor "${name}" shares the Observer model and does not accept model or maxSteps. What it means
Custom (non-built-in) observation extractor entries share the Observer's model by design, so specifying model or maxSteps on them is rejected. This keeps all observation extraction on one model and prevents silent per-extractor model drift.
Source
Thrown at packages/memory/src/processors/observational-memory/subconscious/index.ts:214
return;
}
if (BUILT_IN_OBSERVATION.has(name)) {
if (name === 'capture') {
if ('model' in entry || 'maxSteps' in entry) {
throw new Error('Subconscious capture shares the Observer model and does not accept model or maxSteps.');
}
if (
'schema' in entry &&
entry.schema &&
(!('onExtracted' in entry) || typeof entry.onExtracted !== 'function')
) {
throw new Error('A custom capture schema requires an onExtracted hook that handles its output.');
}
}
return;
}
if ('model' in entry || 'maxSteps' in entry) {
throw new Error(
`Subconscious observation extractor "${name}" shares the Observer model and does not accept model or maxSteps.`,
);
}
if (!('schema' in entry) || !entry.schema || !('onExtracted' in entry) || typeof entry.onExtracted !== 'function') {
throw new Error(`Custom Subconscious observation agent "${name}" requires schema and onExtracted.`);
}
}
#validateReflectionEntry(entry: SubconsciousReflectionEntry): void {
const name = entryName(entry);
if (typeof entry === 'string') {
if (!BUILT_IN_REFLECTION.has(name)) throw new Error(`Unknown Subconscious reflection agent: ${name}`);
return;
}
if (BUILT_IN_REFLECTION.has(name) && 'agent' in entry && entry.agent) {
throw new Error(`Built-in Subconscious reflection agent "${name}" cannot be replaced with a custom agent.`);
}
if (!BUILT_IN_REFLECTION.has(name) && !entry.instructions?.trim() && !('agent' in entry && entry.agent)) {View on GitHub (pinned to 75dd419e61)
Solutions
- Remove model and maxSteps from the custom extractor entry.
- Set the desired model once on the Observer configuration.
- If separate models are essential, run multiple Subconscious processors or a custom pipeline outside this option.
Example fix
// before
{ name: 'facts', model: 'gpt-4o-mini', schema: FactsSchema, onExtracted: save }
// after
{ name: 'facts', schema: FactsSchema, onExtracted: save } // model comes from the Observer Defensive patterns
Strategy: validation
Validate before calling
const custom = { name: 'facts', model: m, schema: S, onExtracted: f };
if ('model' in custom || 'maxSteps' in custom) throw new Error('custom extractors share the Observer model'); Type guard
function isCustomExtractorEntry(e: object): boolean {
return !('model' in e) && !('maxSteps' in e);
} Try / catch
try {
sub = new Subconscious({ observation: [entry] });
} catch (e) {
if (e instanceof Error && e.message.includes('shares the Observer model')) {
const { model: _m, maxSteps: _s, ...rest } = entry as Record<string, unknown>;
sub = new Subconscious({ observation: [rest] });
} else throw e;
} Prevention
- Centralize model selection in the Observer config only.
- Strip model/maxSteps keys when transforming legacy configs.
- Use satisfies/strong typing to flag disallowed keys.
When it happens
Trigger: new Subconscious({ observation: [{ name: 'my-extractor', model: m, schema: S, onExtracted: f }] }) — any custom entry containing 'model' or 'maxSteps' keys.
Common situations: Copy-pasting agent config into an extractor entry; assuming each extractor can use its own model; migrating from an older API that allowed per-extractor models.
Understand the failure class
Background: "Invalid configuration value" and "Unsupported/Unknown setting value" errors: why libraries reject your config strings, numbers, and types — this error's family across 30 libraries.
Related errors
- observationalMemory.experimental_subconscious must be a Subc
- `retrieval: { vector: true }` requires a vector store. Pass
- `retrieval: { vector: true }` requires an embedder. Pass an
- observation.bufferTokens must be > 0, got ${this.observation
- observation.bufferTokens (${this.observationConfig.bufferTok
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/ebc347f2cec4960d.
Report an issue: GitHub.