Re-plan cost when re-plans are hours apart #184
Labels
No labels
accessibility
area:accounts
area:ai-evals
area:look
area:maps
area:platform
area:rides-progress
area:riding
area:today-plan-coach
area:ui-shell
bot:blocked
bot:failed
bot:pr
bot:waiting
bot:working
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
later
now
owner-check
parked
question
ready
session
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ckreidl/trainer#184
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Re-plan cost when re-plans are hours apart (session 14): the 18.4k-token prefix is written to the cache on most real re-plans (5-minute TTL), about US$0.046 of a US$0.06 call on Sonnet; a cache hit costs US$0.02–0.03. Options: no cache breakpoint for re-plans (saves the 25% write premium, loses it for repairs), a smaller library block for re-plans (they rarely need every workout), or the 1-hour TTL if re-plans cluster. Whole-plan schedule changes (8k output, 40–50 s, US$0.10–0.15) stay over both targets; the slug-reference lever in the generation follow-up would cut them too. (parked 2026-10-23: fine for one athlete who rarely regenerates whole plans)
Moved from docs/history.md → Parked follow-ups on 2026-11-08.
What this is about. Each re-plan sends a long fixed prefix (rules, workout library, about 18k tokens) that's cached for 5 minutes. Re-plans are usually hours apart, so the cache expires and almost every re-plan pays to write it again: about US$0.046 of a US$0.06 call. A cache hit would cost US$0.02–0.03.
Options:
Big schedule changes (US$0.10–0.15, 40–50 s) are over target either way.
Status (checked 2026-11-08): unchanged; parked on 2026-10-23. Session 51 (#226) holds re-plans until End chat or a nightly run, which changes how they cluster. Re-check the numbers after it.
Status (checked 2026-11-18): session 51 (#226, held re-plans) has merged. Re-plans now wait for End chat or the nightly 09:00 UTC run, which changes how often they land within the 5-minute cache window. Re-check the cache-write share in recent
AiCallrows before choosing an option.