umpirix/hackathons/geekroom-2026/build-bifrost-demo-video.sh
caelum0x a0ea018c24 feat: integrate Bifrost AI gateway, rename submission to Umpirix
Real Bifrost (github.com/maximhq/bifrost) integration for the Geek Room
hackathon's Bifrost-by-Maxim-AI track, replacing zero prior usage:

- BENCH_LLM_GATEWAY=bifrost routes every LLM-backed call (leaderboard's
  llm row, the auto cascade, and the agent loop's judge stage) through
  Bifrost's universal OpenAI-compatible endpoint instead of the provider
  directly, via one choke point (callBifrostStructured in llm.server.ts).
- Per-call telemetry read straight from Bifrost's own response
  (extra_fields), not recomputed: SystemOneBifrostTelemetry type, a new
  Gateway badge/column on /leaderboard (LeaderboardRow.gateway).
- Real run against a local Bifrost v2.5.1 gateway + Anthropic: 93/93 gold
  calls (accuracy 0.9794), fault-injected re-run (67/93 calls, robustness
  0.621), and a real Bifrost-side fallback demo (5/5 calls served by the
  fallback model, routing_info.is_fallback: true). Full numbers in
  bifrost-run-results.json; reproduce with verify-bifrost.mjs. Committed
  leaderboard.json's llm row now carries this real Bifrost-routed run.
- README gets a "How Bifrost powers Umpirix" section; HACKATHON-SUBMISSION.md
  gets a dedicated Bifrost section + honest-limits bullet.
- Pitch deck: new slide "How Bifrost powers Umpirix", title renamed to
  Umpirix — Benchmark Arena for AI Agents (the owner's submitted project
  title), now 14 slides; re-verified against the actual committed PDF
  (not just the Marp PNG preview) and fixed one real overflow found that
  way. PPTX/PDF rebuilt.
- demo.mp4 rebuilt as a 42.9s real video (real Playwright screen recording
  of the Gateway badge + code-rendered stat cards, no AI footage); prior
  cuts kept as demo-v2-120s-narrated.mp4 / demo-v1-33s-silent.mp4.

Repo/package name intentionally left as openjev (not renamed) per the
owner's direction; Umpirix is the submission's project title.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 16:23:02 +03:00

55 lines
1.9 KiB
Bash

#!/usr/bin/env bash
# Build hackathons/geekroom-2026/demo.mp4 (the Bifrost demo) from real
# material only: a real Playwright screen recording of the /leaderboard
# page's Gateway badge (record-bifrost-demo.mjs -> bifrost-demo-raw.webm)
# plus plain typographic/code-rendered stat cards (build-bifrost-cards.py)
# showing the real numbers from bifrost-run-results.json. No AI-generated
# footage anywhere, per this repo's video doctrine.
#
# Prerequisites:
# python3 -m pip install pillow # card rendering
# a dev server running + a real bifrost-demo-raw.webm (see
# record-bifrost-demo.mjs's own header for how to record it)
#
# Usage: run from this directory (hackathons/geekroom-2026/):
# bash build-bifrost-demo-video.sh
set -euo pipefail
cd "$(dirname "$0")"
python3 build-bifrost-cards.py
BUILD=.bifrost-video-build
CARDS=.bifrost-cards
FPS=25
mkdir -p "$BUILD"
make_card_clip() {
local img=$1 dur=$2 out=$3
ffmpeg -y -loop 1 -framerate "$FPS" -t "$dur" -i "$CARDS/$img" \
-vf "scale=1280:800:force_original_aspect_ratio=decrease,pad=1280:800:(ow-iw)/2:(oh-ih)/2:color=0x0a0a0e,fps=$FPS,format=yuv420p" \
-c:v libx264 -pix_fmt yuv420p "$BUILD/$out"
}
make_card_clip 01-title.png 4 c01.mp4
make_card_clip 02-setup.png 5 c02.mp4
make_card_clip 03-run.png 5 c03.mp4
make_card_clip 04-fault.png 5 c04.mp4
make_card_clip 05-fallback.png 5 c05.mp4
make_card_clip 06-outro.png 4 c06.mp4
ffmpeg -y -i bifrost-demo-raw.webm -vf "fps=$FPS,format=yuv420p" -c:v libx264 -pix_fmt yuv420p -an "$BUILD/screen.mp4"
cat > "$BUILD/concat.txt" << EOF
file 'c01.mp4'
file 'c02.mp4'
file 'screen.mp4'
file 'c03.mp4'
file 'c04.mp4'
file 'c05.mp4'
file 'c06.mp4'
EOF
ffmpeg -y -f concat -safe 0 -i "$BUILD/concat.txt" -c:v libx264 -pix_fmt yuv420p -r "$FPS" demo.mp4
echo "Wrote demo.mp4 ($(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 demo.mp4)s)"