promptdojo_
Checkpoint

One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.

Final drill. Synthesize the lane map into a single routing function: route_briefs(briefs) that takes a list of briefs and returns a list of {"name": <brief_name>, "model": <chosen_model>} dicts in the same order.

Same routing rules as lesson step 08, evaluated in order, FIRST match wins:

  1. needs_camera_control True → "Higgsfield"
  2. budget_max_per_sec < 0.06"Hailuo 02"
  3. needs_audio True AND budget_max_per_sec >= 0.40"Veo 3"
  4. needs_audio True → "Veo 3.1 Lite"
  5. needs_image_input True AND budget_max_per_sec < 0.20"Kling 3.0"
  6. duration_sec >= 20"Sora 2 Pro"
  7. Default → "Sora 2"

Five briefs run. Expected output:

hero_product_trailer       -> Higgsfield
bulk_perf_marketing        -> Hailuo 02
vo_talking_head_premium    -> Veo 3
budget_social_with_vo      -> Veo 3.1 Lite
long_narrative_shot        -> Sora 2 Pro

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.