Repository navigation
[Idea] Optional per-stage model escalation scheduler: auto-retry heavy scenes with a stronger model on timeout/retryable failure #1612
mediasambb
started this conversation in
Ideas
Replies: 1 comment
|
Thanks @mediasambb for opening this as a Discussion first — that's exactly the right order, and sorry it sat without a reply while the PR went up. The problem is real: a single timeout or empty response shouldn't cost an hours-long generation session, and recovering by editing routes and re-triggering pages by hand isn't great. We'd like to solve it with a much smaller design, though:
I've left the same notes on #1614. If you'd like to build this smaller version, ideally coordinated with #1034, we'd be glad to review it. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
An optional, operator-configurable per-stage model escalation policy for course generation. When a stage's base model (e.g.
scene-content:interactive) fails with a retryable error — timeout, empty output, network — the engine re-runs the scene once with an explicitly selected upgrade model, resolved outsideMODEL_ROUTES, and records the decision to a durable ledger.Motivation
Long-running generation stalls when a heavy stage repeatedly times out (observed hours-long sessions lost on a single bad call). Operators currently must edit
MODEL_ROUTESand re-trigger the page manually. The feature makes the fallback automatic, observable, and safe.Design (minimal, disabled by default)
data/model-schedule.json(optionalmodels/budget/escalation/strictMode){ base, escalateTo, trigger: onTimeout | onRetryableError, max }dailyEscalationCap; ledgerdata/schedule-events.jsonl(stage, scene, base → used, reason)UI
New Settings section "Model Scheduling": JSON editor, a 3-tier preset template (cheap/standard/premium model tiers), and a viewer of the last 20 ledger entries.
【截图:ledger-with-entry.png】


【截图:settings-panel.png】
Verification done
pnpm lint0 errors; prettier pass;check:i18n-keyspass (12 locales); Next.js production build passOpen questions for maintainers
strictMode(reserved, not enforced) be dropped or kept for a future approvals flow?I'm available to implement this and open a PR once the design is agreed.
All reactions