feat(copilot): track premium requests with model multipliers (#255)

* Track Copilot premium requests with model multipliers

* refactor(copilot): source premium multipliers from models.json

* feat(copilot): add gpt-5.3-codex bundled model

* fix(stats): round premium request totals in summary

* fix(stats): round premium requests in sync summary
This commit is contained in:
maximhar
2026-03-03 03:26:00 +01:00
committed by GitHub
parent 4b651a95e9
commit 7ea7b53783
25 changed files with 517 additions and 94 deletions
@@ -231,6 +231,11 @@ export class CommandController {
async handleSessionCommand(): Promise<void> {
const stats = this.ctx.session.getSessionStats();
const premiumRequests =
"premiumRequests" in stats && typeof stats.premiumRequests === "number"
? stats.premiumRequests
: this.ctx.session.sessionManager.getUsageStatistics().premiumRequests;
const normalizedPremiumRequests = Math.round((premiumRequests + Number.EPSILON) * 100) / 100;
let info = `${theme.bold("Session Info")}\n\n`;
info += `${theme.fg("dim", "File:")} ${stats.sessionFile ?? "In-memory"}\n`;
@@ -271,9 +276,14 @@ export class CommandController {
}
info += `${theme.fg("dim", "Total:")} ${stats.tokens.total.toLocaleString()}\n`;
if (stats.cost > 0) {
if (stats.cost > 0 || normalizedPremiumRequests > 0) {
info += `\n${theme.bold("Cost")}\n`;
info += `${theme.fg("dim", "Total:")} ${stats.cost.toFixed(4)}\n`;
if (stats.cost > 0) {
info += `${theme.fg("dim", "Total:")} ${stats.cost.toFixed(4)}\n`;
}
if (normalizedPremiumRequests > 0) {
info += `${theme.fg("dim", "Premium Requests:")} ${normalizedPremiumRequests.toLocaleString()}\n`;
}
}
const gateway = await getGatewayStatus();