diff --git a/src/commands/quota/show.ts b/src/commands/quota/show.ts index 958ee71..8c2ec87 100644 --- a/src/commands/quota/show.ts +++ b/src/commands/quota/show.ts @@ -37,8 +37,12 @@ export default defineCommand({ if (config.quiet) { for (const m of models) { - const remaining = m.current_interval_total_count - m.current_interval_usage_count; - console.log(`${m.model_name}\t${m.current_interval_usage_count}\t${m.current_interval_total_count}\t${remaining}`); + // NOTE: current_interval_usage_count from the API actually contains the REMAINING value, not usage. + // We rename it here for clarity and compute the actual used amount. + const remaining = m.current_interval_usage_count; + const total = m.current_interval_total_count; + const used = Math.max(0, total - remaining); + console.log(`${m.model_name}\t${used}\t${total}\t${remaining}`); } return; }