Repository navigation
feat: Copilot AI Credit plan math from total_nano_aiu - #1123
Conversation
Spent credits are finite nanoAiu / 1e9. Token-priced costUSD does not fill the Copilot bar. Thread nanoAiu through cachedCallToApiCall with no cache-version bump.
|
Reviewed (MiniMax draft; findings verified against the diff by maintainer). Preset math, nanoAiu threading through the cache, no-app/no-quota scope claims: all confirmed (including Two changes requested:
|
Store-row nanoAiu is still the bill when the JSONL twin has none. USD plans keep the cost-or-calls retain predicate.
Keep both cachedCallToApiCall spreads: nanoAiu from this PR and supplementaryAccounting / Hermes observation keys from #1121.
foldCopilotSupplementaryTurns will not fold a supplementary twin across a local-day boundary, so the pair can occupy separate turns. Credit spend now groups at session scope.
|
Merged. For the record on the retention-predicate change ( |
Fixes #943
Plan math against real
total_nano_aiu. Not #890. Not #1114 live quota. Noapp/.Behavior
copilotis a plan provider. Presets use official allotments (fetched 2026-08-23), not sticker prices:copilot-pro— 1500 credits / $15 equivalentcopilot-pro-plus— 7000 / $70copilot-max— 20000 / $200codeburn plan set custom --credits N --provider copilotis the org path. Mixed units (--monthly-usd+ copilot) are rejected.sum(finite nanoAiu) / 1e9. Missing nanoAiu →spentCredits = 0+creditsIncomplete. Token-pricedcostUSDdoes not fill the bar.costUSD.N / B AI Credits. Status still says “Not a live provider window.” No GitHub UTC-1st claim.Serve hole
cachedCallToApiCallnow threadsnanoAiuontoParsedApiCall. Same field on the fresh-parse twin.CACHE_VERSIONstays 9 — reconstruction from already-cachedCachedCall.nanoAiuworks.Proofs
plan set copilot-prowrites{ id: copilot-pro, monthlyCredits: 1500, monthlyUsd: 15, provider: copilot, resetDay: 1 }custom --credits 20000 --provider copilotwritesmonthlyCredits: 20000,monthlyUsd: 200custom --monthly-usd 200 --provider copilotexits non-zeronanoAiu = 1_500_000_000→spentCredits === 1.5,budgetCredits === 1500,percentUsed === 0.1nanoAiu→spentCredits === 0,creditsIncomplete === truecostUSD. JSONL / rollup siblings withoutnanoAiudo not change the 1.5