Use ~google/gemini-flash-latest (works with video uploads) and update .env

This commit is contained in:
2026-05-13 11:35:53 -07:00
parent 0aa30847fe
commit 9bd45ae160
3 changed files with 55 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ if not OPENROUTER_API_KEY:
sys.exit(1) sys.exit(1)
OPENROUTER_BASE = "https://openrouter.ai/api/v1" OPENROUTER_BASE = "https://openrouter.ai/api/v1"
DEFAULT_MODEL = os.getenv("OPENROUTER_MODEL", "google/gemini-2.0-pro-exp-02-05:free") DEFAULT_MODEL = os.getenv("OPENROUTER_MODEL", "~google/gemini-flash-latest")
UX_PROMPT = """\ UX_PROMPT = """\
Analyze this screen recording like a UX researcher. Analyze this screen recording like a UX researcher.
@@ -137,6 +137,9 @@ def call_openrouter(payload: dict) -> str:
headers=headers, headers=headers,
json=payload, json=payload,
) )
# Print full error for debugging
if resp.status_code >= 400:
print(f" API status {resp.status_code}: {resp.text[:1000]}", file=sys.stderr)
resp.raise_for_status() resp.raise_for_status()
data = resp.json() data = resp.json()
@@ -207,11 +210,7 @@ examples:
help=f"OpenRouter model (default: {DEFAULT_MODEL})", help=f"OpenRouter model (default: {DEFAULT_MODEL})",
) )
args = parser.parse_args() args = parser.parse_args()
model_override = args.model # local var avoids scoping conflict
global DEFAULT_MODEL
DEFAULT_MODEL = args.model
# Resolve video paths
videos_dir = Path(__file__).resolve().parent.parent / "videos" videos_dir = Path(__file__).resolve().parent.parent / "videos"
if args.videos: if args.videos:
video_paths = [Path(v) for v in args.videos] video_paths = [Path(v) for v in args.videos]
@@ -225,7 +224,9 @@ examples:
print("No video files to analyze.", file=sys.stderr) print("No video files to analyze.", file=sys.stderr)
sys.exit(0) sys.exit(0)
print(f"Analyzing {len(video_paths)} video(s) with model '{args.model}'...") # Patch module-level so build_payload picks it up
globals()['DEFAULT_MODEL'] = model_override
print(f"Analyzing {len(video_paths)} video(s) with model '{model_override}'...")
print("Mode: full-video upload (no frame extraction)") print("Mode: full-video upload (no frame extraction)")
print() print()

View File

@@ -0,0 +1,44 @@
# eFiling — UX Analysis: E-Filing_in_Filevine_2min.mp4
| Field | Value |
|-------|-------|
| **Source video** | `E-Filing_in_Filevine_2min.mp4` |
| **Duration** | 2m 0s |
| **Analysis date** | 2026-05-13 18:35 UTC |
| **Model** | ~google/gemini-flash-latest |
---
Sure! Here is a UX research analysis of the screen recording:
### 1. Overall Workflow Summary
The user is performing a legal e-filing process within the Filevine platform. The workflow involves selecting the filing type (E-File, Initial), checking off required document types, and then manually attaching corresponding PDF files from a project repository. The user experiences several interruptions due to validation errors and a non-intuitive document-matching process.
### 2. Friction Timeline
* **0:34 - 0:40:** User navigates to "File and Serve" and clicks "Add Action."
* **0:41 - 0:47:** Initial hesitation while selecting "Order Type" and "Filing Type."
* **0:48 - 0:58:** User checks multiple document types (Summons, Complaint, etc.).
* **1:00 - 1:10:** **Major Friction Point:** User attempts to "Create" but is blocked by a red validation message: *"We cannot save because you are missing required fields or have invalid data."* The user scrolls up and down, clearly confused about which field is missing.
* **1:11 - 1:20:** User realizes "Filing Status" is required and selects "Unknown."
* **1:21 - 1:50:** **Inefficient Workflow:** User must manually search and attach each document they previously checked off. They accidentally attach the wrong file at 1:42 and have to delete it.
* **1:51 - 2:00:** Continued manual searching for the "Complaint" file.
### 3. Inferred User Intent
The user wants to quickly submit a set of standardized legal documents for a specific case. They expect the system to understand which files are needed based on the checkboxes and ideally "auto-map" them if they already exist in the project folder.
### 4. UX Issues Ranked by Severity
| Severity | Issue | Description |
| :--- | :--- | :--- |
| **High** | **Vague Validation Errors** | The error message at 1:05 doesn't highlight the specific missing field ("Filing Status"), forcing the user to hunt for the mistake. |
| **High** | **Redundant Data Entry** | The user checks "Complaint" in the list, then has to manually find and upload "Complaint.pdf." This is a double-entry task. |
| **Medium** | **Poor UI Discoverability** | The "Filing Status" dropdown is located far below the primary action area, making it easy to miss. |
| **Medium** | **Lack of File Mapping** | The system doesn't suggest files from the project folder that match the checked document types. |
| **Low** | **Confusing Terminology** | "Order Type" vs. "Filing Type" caused a brief moment of hesitation at the start. |
### 5. Suggested Improvements
* **Inline Validation:** Instead of a generic error message at the top, highlight the "Filing Status" field in red with the text "This field is required" as soon as the user tries to save.
* **Smart File Suggestions:** When a user checks "Summons," the "Add Docs" area should automatically suggest files named "Summons" or "Summons.pdf" from the current project folder.
* **Workflow Consolidation:** Combine the document checklist and the file upload area. Instead of two separate steps, provide an "Upload" button directly next to each document type (e.g., [x] Summons -> [Upload File]).
* **Default Values:** If "Initial" filing is selected, the system could default "Filing Status" to a logical starting state to reduce clicks.
* **Visual Feedback:** Use a "Progress Bar" or "Step Indicator" (1. Details, 2. Documents, 3. Review) to help the user understand where they are in the filing process.

Binary file not shown.