Zackriya-Solutions/meetily · error · Error

Summary model recommendation is not ready yet

Error message

Summary model recommendation is not ready yet

What it means

In DownloadProgressStep's retry handler, the summary download invokes builtin_ai_download_model with selectedSummaryModel and throws before the invoke when that state is null. selectedSummaryModel is populated asynchronously from the model-recommendation flow, so clicking Retry before that resolves hits the guard. Note the size calculation two lines above already falls back to recommendedSummaryModel, but the download itself does not — an inconsistency that makes this reachable even when a recommendation exists.

Source

Thrown at frontend/src/components/onboarding/steps/DownloadProgressStep.tsx:131

    console.log('[DownloadProgressStep] Retrying summary model download');
    retryingSummaryRef.current = true;

    // Reset error state
    setSummaryState((prev) => ({
      ...prev,
      status: 'downloading',
      error: undefined,
      progress: 0,
      downloadedMb: 0,
      totalMb: getSummaryModelSizeMb(selectedSummaryModel || recommendedSummaryModel),
      speedMbps: 0,
    }));

    try {
      // Call download command directly (no retry command exists for built-in AI)
      const modelName = selectedSummaryModel;
      if (!modelName) {
        throw new Error('Summary model recommendation is not ready yet');
      }
      await invoke('builtin_ai_download_model', { modelName });
    } catch (error) {
      console.error('[DownloadProgressStep] Summary retry failed:', error);
      setSummaryState((prev) => ({
        ...prev,
        status: 'error',
        error: error instanceof Error ? error.message : 'Retry failed',
      }));

      toast.error('Summary model download retry failed', {
        description: 'Please check your connection and try again.',
      });
    } finally {
      // Allow retry again after 2 seconds
      setTimeout(() => {
        retryingSummaryRef.current = false;
      }, 2000);

View on GitHub (pinned to 0281737d87)

Solutions

  1. Disable the Retry button until selectedSummaryModel (or recommendedSummaryModel) is non-null.
  2. Fall back to recommendedSummaryModel for the invoke, mirroring the getSummaryModelSizeMb call just above.
  3. Await the recommendation when the onboarding step mounts and render a loading state until it resolves.
  4. On failure, keep status 'error' with a message explaining the model suggestion hasn't loaded yet.

Example fix

// before
const modelName = selectedSummaryModel;
if (!modelName) {
  throw new Error('Summary model recommendation is not ready yet');
}
await invoke('builtin_ai_download_model', { modelName });

// after
const modelName = selectedSummaryModel ?? recommendedSummaryModel;
if (!modelName) {
  setSummaryState(p => ({ ...p, status: 'error', error: 'Model suggestion not loaded yet — try again in a moment.' }));
  return;
}
await invoke('builtin_ai_download_model', { modelName });
// and disable the button until a model name exists:
// <button disabled={!selectedSummaryModel && !recommendedSummaryModel}>Retry</button>
Defensive patterns

Strategy: validation

Validate before calling

const model = selectedSummaryModel ?? recommendedSummaryModel;
if (!model) {
  setSummaryState(p => ({ ...p, status: 'error', error: 'Model recommendation still loading — try again shortly.' }));
  return;
}
await invoke('builtin_ai_download_model', { modelName: model });

Type guard

const isModelName = (m: unknown): m is string => typeof m === 'string' && m.trim().length > 0;

Try / catch

try {
  await invoke('builtin_ai_download_model', { modelName: model });
} catch (e) {
  const msg = e instanceof Error ? e.message : String(e);
  setSummaryState(p => ({ ...p, status: 'error', error: msg }));
}

Prevention

When it happens

Trigger: User clicks Retry on the summary download card before the async recommendation request resolves; the recommendation request failed silently leaving selectedSummaryModel null; component remounted mid-onboarding and state had not rehydrated.

Common situations: Slow backend recommendation on first launch, clicking through onboarding quickly, or a retried download after a network error where the recommendation promise was never re-fetched.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16). Data as JSON: /api/errors/68655a0594f92788. Report an issue: GitHub.