Tours v2 / Experiment proposal 01

Can Gemini find the subject
and spot a broken scene?

Use fake homes with known geometry, realistic mock narration, and deliberately flawed landscape clips. Make the review flow real. Keep the rest under our control.

September 6, 2026 · Proposed experiment, not results · Repository snapshot 03c75a95

Gemini first28 synthetic casesScript-aware portrait framingNo paid video generation

Experiment completed. The approved run used 148 model requests and cost $0.5643 within a revised $20 ceiling. Read the results and play the tested videos. The proposal below is preserved for comparison.

A small test with an answer key

There are two questions: does Gemini choose the feature the dialogue is describing, and does it recognize a visible departure from the source photos? A correct answer should survive a different camera angle, an occlusion, and a change in dialogue.

Start with google/gemini-3-flash-preview through OpenRouter. Its listed capabilities include image inputs and structured output. Google's image documentation covers object detection, which makes Gemini a reasonable first candidate. Its ability to judge our scenes remains the hypothesis being tested. Model reference · Image capabilities

The useful first result is a gallery showing source photo → script → raw clip → proposed crop → findings → known answer. We should be able to see why a case passed or failed.

Interactive illustration / no model output

Same room. Different dialogue.

Change the sentence to move the intended portrait window. Add a duplicate object to see why the delivered crop matters.

This drawing explains the test. The experiment will use rendered MP4 clips and separate clean source stills.

Landscape candidate · green outline is the intended 9:16 crop.
Delivered view

1. Write mocks in the planner's actual shape

I inspected two saved historical planner assets from imported render packets: 16 scene entries, all five seconds, with 9–17 spoken words per scene. They separate narration, voice delivery, camera direction, and transition choice.

These are persisted planner outputs, which may include normalization. They are not guaranteed to be the untouched LLM response. Use their structure and pacing to author new scripts; keep customer text and property details out of the fixtures.

Each mock plan supplies fullScript and sceneTimings. The reviewer receives the exact scene's dialogue and timing. Camera direction is intended movement, not proof of what the video actually shows.

{
  "sceneId": "scene-7f2",
  "spokenText": "The tiled fireplace gives this living room a warm gathering place.",
  "voicePromptText": "[warm] The tiled fireplace gives this living room a warm gathering place.",
  "deliveryTags": ["warm"],
  "cameraDirectedMotion": "Move gently rightward at eye level while keeping the room in view.",
  "selectedTransitionEffect": "fade",
  "scriptText": "The tiled fireplace gives this living room a warm gathering place.",
  "durationSeconds": 5
}

Newly authored scene entry. Fixture authoring must validate every optional enum against the current planner contract. Expected focal coordinates live in a separate answer key.

2. Build eight scene/script setups

Render simple homes from colored cuboids, planes, and recognizable objects. Use a deterministic scene description, projected geometry, and a moving camera. Make the fireplace, window, island, and door visually distinct without labels, arrows, or target markers.

SetupNew mock dialogueCrop behavior to test
D1 · Living roomThe tiled fireplace gives this living room a warm gathering place.Left-side fireplace; center crop loses the subject.
D2 · Same footageTall windows bring natural light into this relaxed living space.Right-side window; only the dialogue changes from D1.
D3 · KitchenThe broad kitchen island leaves plenty of room for preparing meals.Low, central subject. Preserve its edges without needless tracking.
D4 · Dining roomThe dining area offers a comfortable place to gather for dinner.Centered control with mild perspective change and normal occlusion.
H1 · BedroomThe built-in closet keeps storage close without crowding the sleeping area.Small right-side target near the frame boundary.
H2 · Same footageA wide bedroom window brings soft daylight across the room.Left-side target; held-out test of following changed dialogue.
H3 · ExteriorThe covered front entrance offers a sheltered welcome into the home.Edge target; clamp the crop to the landscape bounds.
H4 · PatioThe patio table makes this a comfortable spot for outdoor meals.Subject shifts across the image as the camera moves; smooth tracking.

Each setup has three variants: clean, an obvious visible defect, and a defect wholly outside the intended crop. That makes 24 core cases. Use duplicated openings, a disappearing appliance, a warped surface, or an object popping into existence. Keep ordinary perspective changes and occlusions in clean controls.

Four additional challenge cases

  1. Dialogue names two subjects too far apart to fit. Expect an explicit framing limitation.
  2. The camera reveals an area absent from all source photos. Expect uncertainty about its fidelity.
  3. A brief visible defect occurs between regular samples. Measure the sampling miss, then test denser evidence.
  4. A cloned ending needs crop motion through the fade. A defect enters during that motion.

Control the answer key

Render the source stills from the clean scene. Inject defects only into the candidate video. Store per-frame target masks, defect masks, timestamps, and camera transforms outside the model input.

Use opaque IDs and identical file naming for every variant. Counterbalance colors so the most saturated object is not always the target. Hold out whole room families, including their variants and dialogue pairs.

D1–D4 are development cases. H1–H4 and the four challenges are held out. A scene/script setup is not an independent home: the paired setups intentionally share footage.

Crop geometry matters. A 1920 × 1080 landscape frame yields a roughly 608 × 1080 window before scaling to 1080 × 1920. A cover crop has horizontal travel and retains the full source height. The low island is a preservation control; it does not justify inventing vertical panning room.

3. Separate the two skills, then combine them

A / Focus

Can it find the subject?

Give Gemini the source stills, raw landscape samples, and dialogue. Ask for the intended subject, boxes at sampled times, evidence references, and uncertainty.

Build the crop with deterministic geometry. Compare target retention against the answer key, a fixed center crop, and the current pan filter.

B / Review alone

Can it spot the defect?

Give a fresh Gemini call an oracle crop: a feasible crop defined by the fixture author. Review it against the clean sources and dialogue.

This measures fidelity review without a bad focus prediction changing what is visible.

C / Combined

Does the flow work?

Review the crop built from A in another fresh call. Use the same review prompt as B.

Compute expected defect visibility from that actual crop. Missing the spoken subject fails framing even if hiding the defect produces a clean review.

If A cannot produce a valid crop, record C as unresolved and skip its model request. For impossible-framing challenges, B uses an explicitly limited diagnostic crop rather than claiming a feasible oracle solution. Do not give the fidelity reviewer the focus model's explanation or the expected answer. Each request starts fresh. Exclude infeasible and insufficient-evidence challenges from ordinary acceptance metrics, and report their expected unresolved outcomes separately.

Images and timing

Use five-second, 24 fps landscape MP4s for the core set. Decode at 0, 1.5, 3, 4.5 seconds and the actual last frame. Supply individual timestamped images plus one or two clean source stills. Keep image size fixed at a 1024-pixel long edge.

Core defects must intersect those samples. The between-sample challenge deliberately does not. Score both what the model could see and what it missed in the complete video.

Scoring outside the model

Use ground-truth masks on every decoded output frame to calculate target retention and defect visibility. Match reported findings by defect kind, time, and region; flag unmatched assertions as false findings.

Never use a second model as the sole judge. Save unmatched reports for human inspection. Report counts per case and per room family, with repeat consistency, latency, and cost.

Keep the review path real

Mock inputsPlanner JSON, source stills, landscape MP4
Gemini focusDialogue + visual evidence
Local framingValidated boxes → crop → decoded frames
Gemini reviewVisible findings + evidence sufficiency
ControllerAccept, unresolved, or request mock repair
BoundaryProposed treatment
RealGemini requests through the existing OpenRouter adapter; structured schema checks; semantic validation; frame sampling; FFmpeg crop/normalization; crop visibility; local decision controller and evidence records.
MockedScript planner, listing data, scene generation, narration audio, avatar, database, uploads, billing integration, and repair provider. There is no full tour render.
SDKUse the installed AI SDK 6 adapter with .chat(modelId), generateText, Output.object, and maxRetries: 0. Keep domain checks after schema validation. No new agent framework or SDK upgrade is needed for this slice.
Trigger.devRun the same proposed controller locally with file-backed state. Mock dispatch, wait, and Resume. A later isolated Trigger smoke test can verify execution behavior; it is outside this model-quality experiment.

A live capability probe comes first: image delivery, strict output schema, effective model/provider, and usage capture. Record the returned provider. If routing controls are needed, verify that the adapter forwards them. Do not silently switch models or treat the earlier offline SDK check as a live Gemini result.

Proposed output contract and controller rules

Focus returns sceneId, subject, evidenceFrameIds, boxes[{frameId,x,y,width,height}], and status: found | uncertain | cannot_frame. Coordinates are normalized 0–1 in raw landscape space.

Review returns sceneId, evidenceSufficient, findings[{kind,material,confidence,frameId,box,sourcePhotoIds,explanation}], and verdict. Review boxes use cropped-image space. Validation rejects invented IDs, out-of-range boxes, invalid times, and references to images not supplied.

Condition, evaluated in orderExperiment action
Invalid response or impossible cropUnresolved. Record the raw failure; no default center crop and no automatic accept.
Verdict conflicts with findings, or source evidence is insufficientUnresolved. Eligible for one supplemental evidence review if relevant images exist and budget remains.
Evidence-backed material visible finding at ≥ 0.75Request mock repair. Do not purchase another video.
Material visible finding below 0.75Unresolved. Eligible for one supplemental review, never accepted simply for being 0.74.
Sufficient evidence, no material visible findings, valid focusAccept under the experiment policy. Offscreen-only defects do not trigger repair.

A supplemental request uses a denser set or an available supporting view, never the answer key. Budget exhaustion leaves the case unresolved. The primary score uses the first response; supplemental outcomes are reported separately. These are experimental rules, not a calibrated production acceptance policy.

Make frozen endings a specific regression case

For the tail challenge, extend four seconds of footage to five using the real cloned-frame normalization path. Compare the current pan, a fixed crop, and a proposed constrained motion path. The fixed crop is the deliberate freeze control.

For the candidate path, keep the full target box plus a 5% crop-width margin inside every crop. Continue one smooth motion direction with continuous position and velocity. Limit tail translation to 2% of crop width in total and 2% per second; allow at most 2% extra zoom only if the target and margin still fit. If no feasible moving path exists, return cannot_frame_tail. Do not expose a frozen tail as a successful result.

Decode every frame through the last 0.75-second fade. Check known object-edge displacement and target retention on frames with meaningful luminance; brightness changes alone cannot satisfy motion. Record fully black frames separately. Review the final crop samples, including a sample where the planted defect enters during the tail. These numerical bounds are proposals to evaluate visually.

Run it in four steps

  1. Build and inspect the fixtures. Validate mock planner JSON against current types. Render sources, clips, masks, and oracle crops. Inspect a contact sheet and play each variant. Confirm that every core defect is unambiguous in the evidence and that each “outside” defect stays outside the complete oracle path.
  2. Develop on 12 cases. D1–D4 × three variants. Run A, B, and C once. Fix basic prompt or coordinate mistakes here, then freeze fixtures, prompts, schemas, settings, and policy before opening the held-out results.
  3. Evaluate 16 held-out cases twice. H1–H4 × three variants, plus four challenges. Run A, B, and C independently in each repeat. Keep repeated predictions visible; do not select the better result.
  4. Review the gallery and choose the next move. Inspect every disagreement and compare model crops to the baseline. A successful synthetic test earns a cached real-scene evaluation. Weak focus and weak review can be improved independently.

Proposed spending boundary

Up to 36 development calls + 96 held-out calls = 132 primary requests. Reserve up to 12 more for the live probe, explicit retries, denser evidence, or mock-repair reviews. Maximum 144 requests or $5, whichever limit is reached first.

Use at most three concurrent requests. Reserve a conservative cost allowance before dispatch, including in-flight requests and reasoning output. Stop if cost cannot be bounded or recovered. This is a proposed cap, not a cost estimate or permission to run it now.

Repeatable execution

Hash actual source bytes, supporting-photo selection, video bytes, dialogue, timing, samples, crop recipe, prompt, schema, and policy. Record model ID, returned provider, effective settings, request IDs, token usage, latency, and cost.

Persist the request ledger before calls. A restarted local runner retains its request and spend limits. Explicit repeat IDs force fresh Gemini calls while keeping the same frozen evidence.

Mock repair is a recorded repair_requested event with the finding and proposed positive correction text. In an optional controller smoke check, it selects a prebuilt clean counterpart and returns through focus and review. Those calls consume the reserve. They test the branch wiring, not whether a video model can follow the correction.

The model page currently lists standard input/output rates of $0.50/$3 per million tokens. Provider routes differ. Verify the actual route and pricing at execution; do not multiply request count by a guessed image price. Pricing reference

What would make this worth continuing?

Treat these as a strict smoke-test gate on deliberately clear examples. Show raw counts and both repeats. This small correlated set cannot establish production accuracy or calibrate a “75% confidence” threshold.

MeasureProposed next-stage gate
Script sensitivityBoth held-out bedroom scripts choose their respective subjects in both repeats. A dialogue change must change the crop even when the footage is identical.
FramingOn each feasible held-out core case, retain ≥95% of the target's naturally visible mask in ≥95% of decoded frames. Improve the edge-target cases over the current pan and fixed center baselines without regressing the centered controls.
Fidelity aloneWith oracle crops, identify all four held-out visible-defect variants in both repeats. Automatically reject none of the four clean or four offscreen-defect variants. An unresolved result is reported separately and does not count as correct acceptance.
Combined behaviorReport framing failures separately from review errors. A crop that hides the narrated subject cannot pass. Visible findings must be grounded in supplied evidence.
ChallengesReturn unresolved for impossible framing and insufficient sources. Expose the brief-defect sampling miss. Detect the tail's visible defect when sampled and reject the deliberately frozen ending with geometric checks.
Output reliabilityNo malformed or semantically invalid held-out output. Record first-response failures even if a supplemental request succeeds. No silent schema repair or default acceptance.

Deliverable: a reproducible fixture bundle, frozen request configuration, machine-readable scores, and a browsable results gallery with source images, dialogue, raw/cropped clips, findings, truth overlays, and per-case costs. No model results exist yet.

This test can tell us whether the reviewer follows the script and handles controlled visual evidence. Photorealism, subtle architectural errors, video-generation repair quality, real narration alignment, and production Trigger/Resume behavior require later tests.

Evidence and relation to the larger plan

  • Tours v2 scene review and framing home base. This synthetic experiment becomes the first capability test; cached real scenes follow if it passes.
  • Local inspection at 03c75a95: planner contract in tour-script-planning.ts, OpenRouter adapter in lib/openrouter/ai-sdk.ts, and existing pan/cloned-tail behavior in provider-scene-clip-filter.ts. Historical planning shapes came from two manifest-owned imported packets. Customer assets and identifiers are omitted from this public plan.
  • OpenRouter Gemini 3 Flash Preview and Google image understanding, checked September 6, 2026. Capability descriptions support the candidate choice, not an accuracy claim.