Reverse-engineer any video, shot by shot: filmed, AI-generated or coded, and how to remake it. Breakdowns in the open VIDEO.md format. 逆向一切视频,逐个镜头看是拍的、AI 生成的还是代码做的,再告诉你怎么复刻;拆解结果按 VIDEO.md 格式输出。
Python agent-skillsai-videoaigc-detectionclaude-codecodexffmpegprompt-engineeringremotionreverse-engineeringshort-videoshot-detectionsubtitlesvideo-analysisvideo-breakdownvideo-editingvideo-generationvideomdvlm
Keep the failure reason when later VLM calls are skipped
heojunfo32a071a1e5b8
diff --git a/rea_video/vlm.py b/rea_video/vlm.pyindex 57ea8fb..25e4b43 100644--- a/rea_video/vlm.py+++ b/rea_video/vlm.py@@ -170,6 +170,7 @@ class VLMClient:self.media = cfg.mediaself.cache_dir = cache_dirself.dead_requests = 0+ self.dead_reason = "" # what the last of those requests failed with: a skipped call reports itself.models = list(cfg.models) # reordered: the last model that answered goes firstself.video_part = cfg.video_part if cfg.video_part in ("image_url", "video_url") else "image_url"self._part_settled = cfg.video_part in ("image_url", "video_url") # set by the user, or learned from an answer / a second refusal@@ -227,7 +228,8 @@ class VLMClient:except (OSError, ValueError):pass # a half-written file from an interrupted run: ask againif self.gave_up:- raise RuntimeError("VLM skipped: service failed on every model for earlier requests")+ # the reason goes first: callers keep the head of the message, and "skipped" alone hides a bad key or a 500+ raise RuntimeError(f"{self.dead_reason} (VLM skipped: earlier requests failed on every model)")has_video = any(mime.startswith("video/") for _, mime in media)part = self.video_partswapped = False@@ -298,6 +300,7 @@ class VLMClient:time.sleep(1.5)if not refused and not isinstance(last, (ValueError, KeyError)): # transport/server errors, not a bad answerwith self._lock:+ self.dead_reason = str(last)self.dead_requests += 1raise RuntimeError(f"all VLM models failed: {last}")