video-accessibility/backend/app
Vadym Samoilenko ea21cace96 feat: replace SDK with direct HTTP integration to centralized cost tracker
- New services/cost_tracker.py: sync httpx preflight()/record() + async wrappers;
  BudgetExceeded exception; no-op when COST_TRACKER_BASE_URL is empty
- Preflight budget check added before ingestion (Gemini), per-language translation
  (video-native + traditional), and per-language TTS dispatch
- _record_gemini_usage and _record_tts_cost now call cost_tracker directly;
  removes broken asyncio.get_event_loop() hack from sync Celery worker
- Fix: _cost_ctx now threaded into extract_accessibility_targeted (video-native path)
- Fix: user_id/cost_project_id now propagated through dispatch_language_tts →
  synthesize_cue_task.s() and the rerender_accessible_video.py re-render path
- Remove oliver-cost-tracker SDK dependency (was commented-out/never installed)
- Drop cost_tracker_outbox_path setting and get_cost_tracker() factory
- Update COST_TRACKER_BASE_URL default to optical-dev.oliver.solutions in
  .env.prod.example, docker-compose.yml, and all Cloud Run service yamls
- Cloud Run yamls use Secret Manager ref (cost-tracker-api-key) for the API key

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 13:36:15 +01:00
..
__pycache__ fixed middleware silent swallowing of exceptions FINALLY 2025-10-08 18:19:59 -05:00
api/v1 feat: add cost_tracker_project_id assignment UI to QC and Final Review 2026-04-27 11:40:13 +01:00
core feat: replace SDK with direct HTTP integration to centralized cost tracker 2026-04-27 13:36:15 +01:00
lib feat: DCMP compliance, descriptive transcript, new languages, QA bug fixes 2026-03-27 11:50:43 +00:00
middleware fixed overly aggressive security algorithm 2025-10-08 17:49:20 -05:00
migrations feat: add linguist role and user management navigation 2026-04-16 11:46:33 +01:00
models feat: integrate oliver-cost-tracker SDK into video-accessibility 2026-04-27 11:30:46 +01:00
prompts feat: DCMP compliance, descriptive transcript, new languages, QA bug fixes 2026-03-27 11:50:43 +00:00
schemas feat: add cost_tracker_project_id assignment UI to QC and Final Review 2026-04-27 11:40:13 +01:00
services feat: replace SDK with direct HTTP integration to centralized cost tracker 2026-04-27 13:36:15 +01:00
tasks feat: replace SDK with direct HTTP integration to centralized cost tracker 2026-04-27 13:36:15 +01:00
telemetry initial commit 2025-08-24 16:28:33 -05:00
main.py feat: add linguist role and user management navigation 2026-04-16 11:46:33 +01:00