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:
@@ -59,6 +59,10 @@ function formatCost(n: number): string {
|
||||
return `$${n.toFixed(2)}`;
|
||||
}
|
||||
|
||||
function normalizePremiumRequests(n: number): number {
|
||||
return Math.round((n + Number.EPSILON) * 100) / 100;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Command Handler
|
||||
// =============================================================================
|
||||
@@ -120,6 +124,7 @@ async function printStatsSummary(): Promise<void> {
|
||||
console.log(` Total Tokens: ${formatNumber(overall.totalInputTokens + overall.totalOutputTokens)}`);
|
||||
console.log(` Cache Rate: ${formatPercent(overall.cacheRate)}`);
|
||||
console.log(` Total Cost: ${formatCost(overall.totalCost)}`);
|
||||
console.log(` Premium Requests: ${formatNumber(normalizePremiumRequests(overall.totalPremiumRequests ?? 0))}`);
|
||||
console.log(` Avg Duration: ${overall.avgDuration !== null ? formatDuration(overall.avgDuration) : "-"}`);
|
||||
console.log(` Avg TTFT: ${overall.avgTtft !== null ? formatDuration(overall.avgTtft) : "-"}`);
|
||||
if (overall.avgTokensPerSecond !== null) {
|
||||
|
||||
Reference in New Issue
Block a user