moeru-ai/airi · warning

Spark notify ignored: missing active provider or model

Error message

Spark notify ignored: missing active provider or model

What it means

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.

Source

Thrown at packages/stage-ui/src/stores/character/orchestrator/store.ts:122

      pendingNotifies.value.push(event)
    }

    scheduledNotifies.value.push({
      event,
      control: options?.control,
      enqueuedAt: Date.now(),
      nextRunAt: options?.nextRunAt ?? computeNextRunAt(event, 0),
      attempts: 0,
      maxAttempts: options?.maxAttempts ?? attentionConfig.value.maxAttempts,
      reason: options?.reason,
    })
  }

  async function processSparkNotify(event: WebSocketEventOf<'spark:notify'>, control?: SparkNotifyResponseControl) {
    const providerId = activeProvider.value
    const model = activeModel.value
    if (!providerId || !model) {
      console.warn('Spark notify ignored: missing active provider or model')
      return undefined
    }

    const provider = await providersStore.getProviderInstance<ChatProvider>(providerId)
    processing.value = true

    try {
      const result = await sparkNotifyAgent.handle({
        event,
        selectedChat: {
          providerId,
          model,
          provider,
        },
        systemPrompt: systemPrompt.value,
        control,
      })
      if (!result.commands.length)

View on GitHub (pinned to 677329427f)

Solutions

  1. Open provider settings, select and validate a chat provider and model, then wait for the next spark:notify
  2. Re-trigger or re-emit the spark event after configuration - dropped events are not replayed
  3. Verify settings persistence (local storage) is not being wiped between sessions
  4. When emitting test spark:notify events, configure a stub provider first so the agent path executes
Defensive patterns

Strategy: validation

Validate before calling

if (!orchestrator.activeProvider || !orchestrator.activeModel) {
  deferEventUntilConfigured(event)
  return
}
await orchestrator.processSparkNotify(event)

Prevention

When it happens

Trigger: 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.

Common situations: First run before provider onboarding; switching or wiping provider settings mid-session; test harnesses emitting spark events without configuring a provider first.

Related errors


AI-assisted analysis of moeru-ai/airi@677329427f (2026-08-18). Data as JSON: /api/errors/cc36965edb691a3e. Report an issue: GitHub.