Skip to content

fix: restore video agent research budget and finalizer handoff - #27

Merged
devhims merged 2 commits into
mainfrom
fix/video-agent-research-budget
Sep 5, 2026
Merged

fix: restore video agent research budget and finalizer handoff#27
devhims merged 2 commits into
mainfrom
fix/video-agent-research-budget

Conversation

@devhims

@devhims devhims commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Research calls regressed after the per-video finding ceiling increased from five to twenty. In a controlled live GLM comparison using the same transcript, restoring only that ceiling reduced average analyst latency from 27.1s to 16.8s. This restores the five-finding limit while preserving dynamic final-answer scope and the compact response format.

Forced finalization previously started inside the research phase. In an observed production run, the research cutoff canceled synthesis after 5.7s, then recovery started another call that also timed out. The agent now hands off before forced synthesis starts, giving it one continuous finalization phase bounded by the existing 20s limit and overall deadline, with 1.5s reserved for persistence. The handoff is logged. Slow synthesis still returns the existing partial-evidence fallback; this does not extend the 60s run limit.

Validation:

  • TypeScript build passed.
  • All 367 unit tests across 52 files passed.
  • All 16 local Workers integration tests passed.
  • All 10 processor tests passed.
  • A regression test failed before the fix because synthesis was called twice, and passes after the fix with one call across the research cutoff. A second case confirms an over-budget finalizer stops without restarting. Analyst tests enforce the five-finding ceiling.

The branch was created after fast-forwarding main to origin/main at 4cb76b2. Two focused commits separate the extraction limit and finalization handoff. No production deployment or post-fix production test has been performed; those follow merge and deployment.

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
video2ctx-web Ready Ready Preview Sep 5, 2026 10:18pm UTC

@mintlify

mintlify Bot commented Sep 5, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
video2ctx 🟢 Ready View Preview Sep 5, 2026, 10:18 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@devhims
devhims merged commit 68fab61 into main Sep 5, 2026
7 checks passed
@devhims
devhims deleted the fix/video-agent-research-budget branch September 5, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant