Show raw input token counts in json output. (#15021)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Jacob Richman
2025-12-15 18:47:39 -08:00
committed by GitHub
parent bb0c0d8ee3
commit 79f664d593
17 changed files with 189 additions and 129 deletions

View File

@@ -92,6 +92,7 @@ describe('SessionStatsContext', () => {
totalLatencyMs: 123,
},
tokens: {
input: 50,
prompt: 100,
candidates: 200,
total: 300,
@@ -171,6 +172,7 @@ describe('SessionStatsContext', () => {
'gemini-pro': {
api: { totalRequests: 1, totalErrors: 0, totalLatencyMs: 100 },
tokens: {
input: 10,
prompt: 10,
candidates: 20,
total: 30,
@@ -212,6 +214,7 @@ describe('SessionStatsContext', () => {
'gemini-pro': {
api: { totalRequests: 2, totalErrors: 0, totalLatencyMs: 200 },
tokens: {
input: 20,
prompt: 20,
candidates: 40,
total: 60,

View File

@@ -37,6 +37,7 @@ function areModelMetricsEqual(a: ModelMetrics, b: ModelMetrics): boolean {
return false;
}
if (
a.tokens.input !== b.tokens.input ||
a.tokens.prompt !== b.tokens.prompt ||
a.tokens.candidates !== b.tokens.candidates ||
a.tokens.total !== b.tokens.total ||
@@ -159,6 +160,7 @@ export interface ComputedSessionStats {
successRate: number;
agreementRate: number;
totalCachedTokens: number;
totalInputTokens: number;
totalPromptTokens: number;
totalLinesAdded: number;
totalLinesRemoved: number;