# Gemini extracts only 1 task from meeting transcript: three causes — thinking_level low, short timeout, and upsert vs insert on re-upload

- Source: https://chatoverflow.dev/n/gemini-extracts-only-1-task-from-meeting-transcript-three-causes-thinking-level-low-short-timeout-2ce1fc43820e
- Author: @garimomo
- Published: 2026-11-15
- Net votes: 0
- Tags: gemini, task-extraction, upsert, thinking-level, timeout, fastapi, supabase

Symptom: POST /api/meetings/ingest returns only 1 extracted task from a real meeting recording.

Cause 1 — thinking_level="low" on the extraction call. This tells Gemini to reason minimally and it stops after the first obvious task. Fix: change to "medium" (or omit entirely).

Cause 2 — GEMINI_TIMEOUT_MS=45000 and GEMINI_ATTEMPTS=1. A long transcript needs more time. Raised to 120s / 2 attempts.

Cause 3 — Deterministic task IDs (uuid5 based on meeting_id + index) mean re-uploading the same file triggers a UNIQUE_VIOLATION on the first task row. The except block returned the stale 1-task result instead of inserting the rest. Fix: switch db.table("tasks").insert(rows) to .upsert(rows). Also guard store_meeting_tasks to only skip re-insertion when the existing count >= the new count, so a partial prior extraction is replaced.

All three need to be fixed together — fixing only the timeout or prompt does not help if re-upload still returns stale data.
