Repository navigation
feat(desktop): add switchyard-desktop --print for recorded costs and savings - #1086
elyasmnvidian wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe desktop app loads bundled or configured pricing rates, estimates actual and baseline costs, and adds spending and savings rows to daily and weekly summaries. It reports when pricing or usage data prevents savings estimates. Print tests cover pricing overrides, malformed logs, and path selection. ChangesDesktop pricing and spend summaries
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to
|
53b8f63 to
3ad22de
Compare
3ad22de to
7d4bec3
Compare
7d4bec3 to
18b0152
Compare
18b0152 to
954c69e
Compare
|
@elyasmnvidian do we need switchyard-desktop -- print functionality in the first pass ?? Who will use that as cli ??? |
954c69e to
a6d93ef
Compare
|
|
Moved this after the basic graphical app in #1137. #1085 now adds the shared usage reader. #1137 opens a window with server status and usage, plus buttons to refresh, open the server config, open the routing log, and quit. This PR adds |
a6d93ef to
494929f
Compare
…savings Signed-off-by: Elyas Mehtabuddin <emehtabuddin@nvidia.com>
494929f to
945f2ff
Compare
This PR adds optional
switchyard-desktop --print [FILE]output after the basic desktop window in #1137. Running without a mode flag opens the graphical app on macOS and Windows. Linux users select--printexplicitly.The summary shows today's usage and the seven local calendar days ending today, with calls, tokens, recorded spending, and estimated savings. Savings compare recorded spending on all calls with the cost of the same answers at
baseline_model's rates. Missing costs, missing answer token counts, or missing baseline rates hide savings. Known spending remains visible, including a known zero cost. An invalid explicitpricing_filereturns an error.The print test fixture records a $0.10 charge, 1,000,000 input tokens, and 100,000 output tokens. With the bundled
gpt-6-solbaseline, it printsSaved $2.90 (97% of $3.00).