Pure image/video tools + local-first history - #86
Merged
Conversation
ImageGen and VideoGen no longer call an LLM 'media router' to rewrite the prompt or pick a model. That second call ran on a free NVIDIA model and hit the gateway's 120s provider timeout, making video generation appear broken. The tools now use exactly the model + prompt the caller gives: - delete src/agent/media-router.ts (+ its local tests) - videogen: keep a pure price-math cost confirm (no LLM); only prompts when an onAskUser bridge exists (CLI/agent), so direct callers generate immediately - imagegen: pure direct generation Also make conversation-history cloud sync OPT-IN (FRANKLIN_CLOUD_SYNC=on) instead of default-on, so the desktop is local-first like Claude Code / Codex.
The confirm prompt named the chosen model but quoted a flat $0.05/s estimate, so a non-default model could show a wrong price. Resolve the model via findModel + estimateCostUsd (same pattern used downstream), falling back to the flat per-second estimate only when the model is unknown.
VickyXAI
added a commit
that referenced
this pull request
Jun 18, 2026
ImageGen had no spend confirmation after the media-router removal (#86) — the router proposal was its only AskUser path. Add a pure price-math, model-aware Generate/Cancel confirm (parity with VideoGen): interactive callers see the model + estimated cost before any USDC is spent; direct callers (desktop, no onAskUser) generate immediately. Also document #86 in the CHANGELOG (3.29.4), including the upgrade note that cloud sync is now opt-in (FRANKLIN_CLOUD_SYNC=on). Co-authored-by: 1bcMax <195689928+1bcMax@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
onAskUserbridge exists (CLI/agent). Direct callers (desktop) generate immediately.src/agent/media-router.tsand its local tests.FRANKLIN_CLOUD_SYNC=on) instead of default-on → desktop is local-first like Claude Code / Codex.Why
Customer reported 'video generation broken' — root cause was the media-router's free-NVIDIA call timing out at 120s, not the video pipeline (Seedance → token360 is fine).
Verified
npm run buildclean; 446 local tests pass (media-router tests removed)