Skip to content

Give a held model the effort of Auto's pick - #193

Merged
BunsDev merged 2 commits into
mainfrom
held-effort
Oct 13, 2026
Merged

BunsDev merged 2 commits into
mainfrom
held-effort

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

When a warm prompt cache keeps a thread on a model one tier below Auto's pick, the turn ran at the thread's last effort. It got neither the stronger model nor more thinking. Changing effort leaves the cache intact on both CLIs (2026-10-12 probe: Claude 36,905/36,972 tokens read after an effort change; Codex 53,760/53,950). So a held route now runs at the effort Auto chose for its pick.

Rule

  • The cache decides the model; the request decides the effort. A kept model runs at the effort Auto chose for the model it would have picked. Step 5's formula moves into requestEffort() and is evaluated at the pick's tier. The result is fitted to the kept model's supported levels, under max_effort and the budget's high cap.
  • Kept below the pick (always exactly one tier, since two tiers move up): effort rises. Example: Sonnet held for an Opus-level request goes from medium to high. The receipt adds: "Raised effort from medium to high to make up for staying below opus; an effort change keeps the cache."
  • Kept above the pick: the turn runs at the pick's lower effort. Example: the top Codex model held for a small edit goes from xhigh to medium. The receipt adds: "Lowered effort from xhigh to medium, the effort gpt-5.6-x would have used; …". Before Keep Auto's model while the prompt cache is warm #183, this turn would have run on the smaller model at that effort.
  • Held turns no longer reuse the thread's last effort. The runner saves each turn's effort to the thread. Reusing it would have let one raise stick for every later held turn. One test covers that case: Sonnet raised to high, followed by a quick answer, runs at low.
  • Unchanged:
    • Where EFFORT_CLEARS_CACHE is true, the old keep-current effort applies.
    • Same-model routes are not touched.
    • Low-confidence and no-model-list routes still keep the thread's effort.
    • Fast mode is still held.
    • A raise to xhigh or max counts as a premium turn, as the move up would have.

Behavior change to note

Before this change, a model kept above its pick ran at whatever effort the thread last had, usually the effort it was first picked with. It now runs at the lower effort of the model Auto would have switched to. That is cheaper and matches the routing intent: the request was judged fine on the smaller model at that effort. It is the half of this change that wasn't explicitly asked for, and is easy to revert separately if unwanted.

Verification

  • npm run build, npm run typecheck and npm test all pass: 1,422 unit tests, 1,406 passed, 16 skipped, 0 failed.
  • Two new hold tests cover:
    • the raise and its receipt;
    • a later light turn that is not stuck at the raised effort;
    • a deep-reasoning request (high to xhigh);
    • the max_effort: high cap (no raise claimed);
    • the EFFORT_CLEARS_CACHE fallback.
  • Three existing assertions changed to the new lowered effort.
  • Docs: docs/auto-routing.md step 7, plus a line under On main, unreleased in docs/status.md.

When a warm prompt cache keeps a thread on a model one tier below
Auto's pick, the turn ran at the thread's last effort, so it got
neither the stronger model nor more thinking. An effort change keeps
the cache on both CLIs (measured 2026-10-12), so a held route now runs
at the effort Auto chose for the pick, fitted to the kept model's
levels within the ceiling and the budget's high cap. A model kept
above its pick runs at the pick's lower effort.

Held turns no longer reuse the thread's last effort, because the
router saves each turn's effort to the thread; reusing it would let
a raise stick for every later held turn. Receipts say "Raised effort
from X to Y" or "Lowered effort from X to Y". Where an effort change
would clear the cache, the old behavior stays.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
modex Ready Ready Preview Oct 13, 2026 9:46am UTC

Request Review

@BunsDev
BunsDev merged commit 84d8a62 into main Oct 13, 2026
7 checks passed
BunsDev added a commit that referenced this pull request Oct 13, 2026
Keeps both new docs/status.md entries: held-model effort (#193) and pnpm only.

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 13, 2026
Preserve the delivered #193 routing policy and record successful native candidate verification at fdaf1cb. Verify the combined preparation with a fresh build, typechecks and full unit suite.

Coven-Harness: Codex / gpt-6-astra
@BunsDev
BunsDev deleted the held-effort branch October 13, 2026 12:48

This branch was successfully deployed

1 active deployment
Preview — 8dbf1f0b Deployed Oct 13, 2026 by vercel[bot]
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