{"record":{"id":"cc36965edb691a3e","repo":"moeru-ai/airi","slug":"spark-notify-ignored-missing-active-provider-or-m","errorCode":null,"errorMessage":"Spark notify ignored: missing active provider or model","messagePattern":"Spark notify ignored: missing active provider or model","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/stage-ui/src/stores/character/orchestrator/store.ts","lineNumber":122,"sourceCode":"      pendingNotifies.value.push(event)\n    }\n\n    scheduledNotifies.value.push({\n      event,\n      control: options?.control,\n      enqueuedAt: Date.now(),\n      nextRunAt: options?.nextRunAt ?? computeNextRunAt(event, 0),\n      attempts: 0,\n      maxAttempts: options?.maxAttempts ?? attentionConfig.value.maxAttempts,\n      reason: options?.reason,\n    })\n  }\n\n  async function processSparkNotify(event: WebSocketEventOf<'spark:notify'>, control?: SparkNotifyResponseControl) {\n    const providerId = activeProvider.value\n    const model = activeModel.value\n    if (!providerId || !model) {\n      console.warn('Spark notify ignored: missing active provider or model')\n      return undefined\n    }\n\n    const provider = await providersStore.getProviderInstance<ChatProvider>(providerId)\n    processing.value = true\n\n    try {\n      const result = await sparkNotifyAgent.handle({\n        event,\n        selectedChat: {\n          providerId,\n          model,\n          provider,\n        },\n        systemPrompt: systemPrompt.value,\n        control,\n      })\n      if (!result.commands.length)","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/moeru-ai/airi/blob/677329427f32468c74b17f3ec47eeca4e05bec65/packages/stage-ui/src/stores/character/orchestrator/store.ts#L104-L140","documentation":"The character orchestrator store drops an incoming 'spark:notify' WebSocket event when activeProvider or activeModel is unset. processSparkNotify returns undefined immediately, so the spark-reaction agent never runs and the event is skipped - by design, because generating a reaction requires a configured chat provider and model.","triggerScenarios":"Fresh install where no chat provider/model was selected in settings; the selected provider was removed or its settings cleared while the server keeps sending spark:notify events; events arriving before the user finishes onboarding.","commonSituations":"First run before provider onboarding; switching or wiping provider settings mid-session; test harnesses emitting spark events without configuring a provider first.","solutions":["Open provider settings, select and validate a chat provider and model, then wait for the next spark:notify","Re-trigger or re-emit the spark event after configuration - dropped events are not replayed","Verify settings persistence (local storage) is not being wiped between sessions","When emitting test spark:notify events, configure a stub provider first so the agent path executes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!orchestrator.activeProvider || !orchestrator.activeModel) {\n  deferEventUntilConfigured(event)\n  return\n}\nawait orchestrator.processSparkNotify(event)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Complete provider/model onboarding before subscribing to spark:notify events","Queue or drop events explicitly at the caller so 'ignored' is a visible decision","Validate settings persistence so activeProvider survives reloads"],"tags":["orchestrator","spark-notify","provider-config","event-dropped"],"backgroundTag":"missing-provider-config","analyzedSha":"677329427f32468c74b17f3ec47eeca4e05bec65","analyzedAt":"2026-08-18T17:29:58.153Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}