legco_ai_assistant/backend/app/models
Woody 284028bb1f feat: Phase 3.1 + 3.2 — YouTube config infra and URL extraction
Phase 3.1 — Configuration & Infrastructure:
- Add youtube_proxy_enabled, yt_dlp_timeout, yt_dlp_cache_ttl config fields
- Add yt-dlp and hls.js dependencies
- Create models/youtube.py (request/response schemas)
- Create service stubs (youtube_service, hls_proxy)
- Create router stub and register in main.py
- 11 config tests

Phase 3.2 — YouTube URL Extraction:
- yt-dlp wrapper with async extraction (run_in_executor)
- Format selection: ≤480p video-only + highest-bitrate audio (VOD)
- Combined format fallback: same URL for live streams
- In-memory URL cache: 5min TTL live, 30min VOD
- lru_cache singleton service for cache persistence
- Error handling: DownloadError → 200 with error field
- 18 extract tests, 82/82 total pass (zero regressions)

Real-URL verified: VOD (5bF3tkO5jAA) 24 formats, Live (fN9uYWCjQaw) 6 HLS
2026-05-09 15:53:04 +08:00
..
__init__.py feat: Phase 1.1 project setup with config, database, and models 2026-04-22 16:13:52 +08:00
asr.py feat: Phase 2.1 config + infrastructure and 2.2 video upload backend 2026-05-06 13:08:19 +08:00
common.py feat: structured LLM output for decompose + citation fuzzy matching (Phase 5) 2026-04-28 15:39:17 +08:00
decompose.py feat: configurable SubQuestions via Step 1.2 system prompt page 2026-05-04 17:22:14 +08:00
documents.py feat(backend): add documents CRUD service methods and Pydantic schemas 2026-04-23 19:02:07 +08:00
highlight.py feat: track highlight generation prompt, response, and timing in history (Phase 5.5) 2026-04-29 11:18:21 +08:00
history.py feat: track highlight generation prompt, response, and timing in history (Phase 5.5) 2026-04-29 11:18:21 +08:00
ingest.py refactor(backend): update Pydantic models for ingestion and query 2026-04-23 13:26:20 +08:00
prompts.py feat(prompts): add JSON export/import for profile prompt configurations 2026-04-27 19:44:35 +08:00
query.py feat(models): add SubQuestionSources model and per-sub-q history fields 2026-04-26 23:28:19 +08:00
video.py feat: Phase 2.1 config + infrastructure and 2.2 video upload backend 2026-05-06 13:08:19 +08:00
youtube.py feat: Phase 3.1 + 3.2 — YouTube config infra and URL extraction 2026-05-09 15:53:04 +08:00