diff --git a/docs/developers/development/telemetry.md b/docs/developers/development/telemetry.md index 006a668a7..442d34b52 100644 --- a/docs/developers/development/telemetry.md +++ b/docs/developers/development/telemetry.md @@ -249,7 +249,6 @@ Logs are timestamped records of specific events. The following events are logged - `output_token_count` - `cached_content_token_count` - `thoughts_token_count` - - `tool_token_count` - `response_text` (if applicable) - `auth_type` @@ -315,7 +314,7 @@ Metrics are numerical measurements of behavior over time. The following metrics - `qwen-code.token.usage` (Counter, Int): Counts the number of tokens used. - **Attributes**: - `model` - - `type` (string: "input", "output", "thought", "cache", or "tool") + - `type` (string: "input", "output", "thought", or "cache") - `qwen-code.file.operation.count` (Counter, Int): Counts file operations. - **Attributes**: diff --git a/packages/cli/src/nonInteractiveCli.test.ts b/packages/cli/src/nonInteractiveCli.test.ts index b2757d845..9b5508239 100644 --- a/packages/cli/src/nonInteractiveCli.test.ts +++ b/packages/cli/src/nonInteractiveCli.test.ts @@ -1225,7 +1225,6 @@ describe('runNonInteractive', () => { total: 16, cached: 3, thoughts: 0, - tool: 0, }, }, }, diff --git a/packages/cli/src/ui/components/ModelStatsDisplay.test.tsx b/packages/cli/src/ui/components/ModelStatsDisplay.test.tsx index 9e871ad3f..b6c3b1b05 100644 --- a/packages/cli/src/ui/components/ModelStatsDisplay.test.tsx +++ b/packages/cli/src/ui/components/ModelStatsDisplay.test.tsx @@ -91,7 +91,6 @@ describe('', () => { total: 30, cached: 0, thoughts: 0, - tool: 0, }, }), }, @@ -108,7 +107,6 @@ describe('', () => { const output = lastFrame(); expect(output).not.toContain('Cached'); expect(output).not.toContain('Thoughts'); - expect(output).not.toContain('Tool'); expect(output).toMatchSnapshot(); }); @@ -123,7 +121,6 @@ describe('', () => { total: 30, cached: 5, thoughts: 2, - tool: 0, }, }), 'gemini-2.5-flash': mainOnly({ @@ -134,7 +131,6 @@ describe('', () => { total: 15, cached: 0, thoughts: 0, - tool: 3, }, }), }, @@ -151,7 +147,6 @@ describe('', () => { const output = lastFrame(); expect(output).toContain('Cached'); expect(output).toContain('Thoughts'); - expect(output).toContain('Tool'); expect(output).toMatchSnapshot(); }); @@ -166,7 +161,6 @@ describe('', () => { total: 300, cached: 50, thoughts: 10, - tool: 5, }, }), 'gemini-2.5-flash': mainOnly({ @@ -177,7 +171,6 @@ describe('', () => { total: 600, cached: 100, thoughts: 20, - tool: 10, }, }), }, @@ -212,7 +205,6 @@ describe('', () => { total: 999999999, cached: 123456789, thoughts: 111111111, - tool: 222222222, }, }), }, @@ -240,7 +232,6 @@ describe('', () => { total: 30, cached: 5, thoughts: 2, - tool: 1, }, }), }, @@ -281,7 +272,6 @@ describe('', () => { total: 30, cached: 0, thoughts: 0, - tool: 0, }, }); @@ -309,7 +299,6 @@ describe('', () => { total: 60, cached: 0, thoughts: 0, - tool: 0, }, bySource: { [MAIN_SOURCE]: mainCore, diff --git a/packages/cli/src/ui/components/ModelStatsDisplay.tsx b/packages/cli/src/ui/components/ModelStatsDisplay.tsx index 389c4221f..ae4e4a2ab 100644 --- a/packages/cli/src/ui/components/ModelStatsDisplay.tsx +++ b/packages/cli/src/ui/components/ModelStatsDisplay.tsx @@ -89,7 +89,6 @@ export const ModelStatsDisplay: React.FC = ({ const hasThoughts = entries.some( ({ metrics }) => metrics.tokens.thoughts > 0, ); - const hasTool = entries.some(({ metrics }) => metrics.tokens.tool > 0); const hasCached = entries.some(({ metrics }) => metrics.tokens.cached > 0); return ( @@ -199,13 +198,6 @@ export const ModelStatsDisplay: React.FC = ({ values={getModelValues((m) => m.tokens.thoughts.toLocaleString())} /> )} - {hasTool && ( - m.tokens.tool.toLocaleString())} - /> - )} ', () => { total: 3500, cached: 500, thoughts: 300, - tool: 200, }, }), }, diff --git a/packages/cli/src/ui/components/StatsDisplay.test.tsx b/packages/cli/src/ui/components/StatsDisplay.test.tsx index 0a4540ca2..abc7314a6 100644 --- a/packages/cli/src/ui/components/StatsDisplay.test.tsx +++ b/packages/cli/src/ui/components/StatsDisplay.test.tsx @@ -106,7 +106,6 @@ describe('', () => { total: 43234, cached: 500, thoughts: 100, - tool: 50, }, }), 'gemini-2.5-flash': mainOnly({ @@ -117,7 +116,6 @@ describe('', () => { total: 150000000, cached: 10000, thoughts: 2000, - tool: 1000, }, }), }, @@ -156,7 +154,6 @@ describe('', () => { total: 250, cached: 50, thoughts: 0, - tool: 0, }, }), }, @@ -239,7 +236,6 @@ describe('', () => { total: 200, cached: 0, thoughts: 0, - tool: 0, }, }), }, @@ -400,7 +396,6 @@ describe('', () => { total: tokens * 2, cached: 0, thoughts: 0, - tool: 0, }, }); @@ -438,7 +433,6 @@ describe('', () => { total: mainCore.tokens.total + echoerCore.tokens.total, cached: 0, thoughts: 0, - tool: 0, }, bySource: { [MAIN_SOURCE]: mainCore, @@ -472,7 +466,6 @@ describe('', () => { total: 80, cached: 0, thoughts: 0, - tool: 0, }, bySource: { researcher: coreMetrics(1, 40), @@ -506,7 +499,6 @@ describe('', () => { total: 60, cached: 0, thoughts: 0, - tool: 0, }, bySource: { alpha: alphaCore, diff --git a/packages/cli/src/ui/components/__snapshots__/ModelStatsDisplay.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/ModelStatsDisplay.test.tsx.snap index 970b5159d..8b2891887 100644 --- a/packages/cli/src/ui/components/__snapshots__/ModelStatsDisplay.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/ModelStatsDisplay.test.tsx.snap @@ -17,7 +17,6 @@ exports[` > should display a single model correctly 1`] = ` │ ↳ Prompt 10 │ │ ↳ Cached 5 (50.0%) │ │ ↳ Thoughts 2 │ -│ ↳ Tool 1 │ │ ↳ Output 20 │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" @@ -40,7 +39,6 @@ exports[` > should display conditional rows if at least one │ ↳ Prompt 10 5 │ │ ↳ Cached 5 (50.0%) 0 (0.0%) │ │ ↳ Thoughts 2 0 │ -│ ↳ Tool 0 3 │ │ ↳ Output 20 10 │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" @@ -63,7 +61,6 @@ exports[` > should display stats for multiple models correc │ ↳ Prompt 100 200 │ │ ↳ Cached 50 (50.0%) 100 (50.0%) │ │ ↳ Thoughts 10 20 │ -│ ↳ Tool 5 10 │ │ ↳ Output 200 400 │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" @@ -86,7 +83,6 @@ exports[` > should handle large values without wrapping or │ ↳ Prompt 987,654,321 │ │ ↳ Cached 123,456,789 (12.5%) │ │ ↳ Thoughts 111,111,111 │ -│ ↳ Tool 222,222,222 │ │ ↳ Output 123,456,789 │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯" diff --git a/packages/cli/src/ui/contexts/SessionContext.test.tsx b/packages/cli/src/ui/contexts/SessionContext.test.tsx index 6145a5e03..b0e488a3b 100644 --- a/packages/cli/src/ui/contexts/SessionContext.test.tsx +++ b/packages/cli/src/ui/contexts/SessionContext.test.tsx @@ -71,7 +71,6 @@ describe('SessionStatsContext', () => { total: 300, cached: 50, thoughts: 20, - tool: 10, }, bySource: {}, }, @@ -150,7 +149,6 @@ describe('SessionStatsContext', () => { total: 30, cached: 0, thoughts: 0, - tool: 0, }, bySource: {}, }, @@ -192,7 +190,6 @@ describe('SessionStatsContext', () => { total: 60, cached: 0, thoughts: 0, - tool: 0, }, bySource: {}, }, diff --git a/packages/cli/src/ui/contexts/SessionContext.tsx b/packages/cli/src/ui/contexts/SessionContext.tsx index 8d5a103ed..c348d5b4d 100644 --- a/packages/cli/src/ui/contexts/SessionContext.tsx +++ b/packages/cli/src/ui/contexts/SessionContext.tsx @@ -45,8 +45,7 @@ function areModelMetricsCoreEqual( a.tokens.candidates !== b.tokens.candidates || a.tokens.total !== b.tokens.total || a.tokens.cached !== b.tokens.cached || - a.tokens.thoughts !== b.tokens.thoughts || - a.tokens.tool !== b.tokens.tool + a.tokens.thoughts !== b.tokens.thoughts ) { return false; } diff --git a/packages/cli/src/ui/utils/computeStats.test.ts b/packages/cli/src/ui/utils/computeStats.test.ts index b0199816d..7cb9f3a39 100644 --- a/packages/cli/src/ui/utils/computeStats.test.ts +++ b/packages/cli/src/ui/utils/computeStats.test.ts @@ -26,7 +26,6 @@ describe('calculateErrorRate', () => { total: 0, cached: 0, thoughts: 0, - tool: 0, }, }; expect(calculateErrorRate(metrics)).toBe(0); @@ -41,7 +40,6 @@ describe('calculateErrorRate', () => { total: 0, cached: 0, thoughts: 0, - tool: 0, }, }; expect(calculateErrorRate(metrics)).toBe(20); @@ -58,7 +56,6 @@ describe('calculateAverageLatency', () => { total: 0, cached: 0, thoughts: 0, - tool: 0, }, }; expect(calculateAverageLatency(metrics)).toBe(0); @@ -73,7 +70,6 @@ describe('calculateAverageLatency', () => { total: 0, cached: 0, thoughts: 0, - tool: 0, }, }; expect(calculateAverageLatency(metrics)).toBe(150); @@ -90,7 +86,6 @@ describe('calculateCacheHitRate', () => { total: 0, cached: 100, thoughts: 0, - tool: 0, }, }; expect(calculateCacheHitRate(metrics)).toBe(0); @@ -105,7 +100,6 @@ describe('calculateCacheHitRate', () => { total: 0, cached: 50, thoughts: 0, - tool: 0, }, }; expect(calculateCacheHitRate(metrics)).toBe(25); @@ -160,7 +154,6 @@ describe('computeSessionStats', () => { total: 20, cached: 0, thoughts: 0, - tool: 0, }, bySource: {}, }, @@ -199,7 +192,6 @@ describe('computeSessionStats', () => { total: 160, cached: 50, thoughts: 0, - tool: 0, }, bySource: {}, }, diff --git a/packages/cli/src/ui/utils/modelsBySource.test.ts b/packages/cli/src/ui/utils/modelsBySource.test.ts index e59871b86..e8ed30e27 100644 --- a/packages/cli/src/ui/utils/modelsBySource.test.ts +++ b/packages/cli/src/ui/utils/modelsBySource.test.ts @@ -20,7 +20,6 @@ const emptyCore = (): ModelMetricsCore => ({ total: 0, cached: 0, thoughts: 0, - tool: 0, }, }); diff --git a/packages/cli/src/utils/nonInteractiveHelpers.test.ts b/packages/cli/src/utils/nonInteractiveHelpers.test.ts index 0a6015a85..00aaa1cfe 100644 --- a/packages/cli/src/utils/nonInteractiveHelpers.test.ts +++ b/packages/cli/src/utils/nonInteractiveHelpers.test.ts @@ -350,7 +350,6 @@ describe('computeUsageFromMetrics', () => { total: 150, cached: 10, thoughts: 0, - tool: 0, }, bySource: {}, }, @@ -393,7 +392,6 @@ describe('computeUsageFromMetrics', () => { total: 150, cached: 10, thoughts: 0, - tool: 0, }, bySource: {}, }, @@ -405,7 +403,6 @@ describe('computeUsageFromMetrics', () => { total: 200, cached: 15, thoughts: 0, - tool: 0, }, bySource: {}, }, @@ -448,7 +445,6 @@ describe('computeUsageFromMetrics', () => { total: 0, cached: 10, thoughts: 0, - tool: 0, }, bySource: {}, }, diff --git a/packages/core/src/agents/arena/ArenaAgentClient.test.ts b/packages/core/src/agents/arena/ArenaAgentClient.test.ts index 5959d68cf..46d944958 100644 --- a/packages/core/src/agents/arena/ArenaAgentClient.test.ts +++ b/packages/core/src/agents/arena/ArenaAgentClient.test.ts @@ -40,7 +40,6 @@ const createMockMetrics = ( total: overrides.totalTokens ?? 0, cached: 0, thoughts: 0, - tool: 0, }, bySource: {}, }, @@ -461,7 +460,6 @@ describe('ArenaAgentClient', () => { total: 150, cached: 0, thoughts: 0, - tool: 0, }, bySource: {}, }, @@ -477,7 +475,6 @@ describe('ArenaAgentClient', () => { total: 300, cached: 0, thoughts: 0, - tool: 0, }, bySource: {}, }, diff --git a/packages/core/src/core/turn.test.ts b/packages/core/src/core/turn.test.ts index 148a19d63..92c86f9ed 100644 --- a/packages/core/src/core/turn.test.ts +++ b/packages/core/src/core/turn.test.ts @@ -408,7 +408,6 @@ describe('Turn', () => { candidatesTokenCount: 50, cachedContentTokenCount: 10, thoughtsTokenCount: 5, - toolUsePromptTokenCount: 2, }, } as GenerateContentResponse, }; @@ -435,7 +434,6 @@ describe('Turn', () => { candidatesTokenCount: 50, cachedContentTokenCount: 10, thoughtsTokenCount: 5, - toolUsePromptTokenCount: 2, }, }, }, diff --git a/packages/core/src/output/json-formatter.test.ts b/packages/core/src/output/json-formatter.test.ts index 071ff3f93..f291fe757 100644 --- a/packages/core/src/output/json-formatter.test.ts +++ b/packages/core/src/output/json-formatter.test.ts @@ -64,7 +64,6 @@ describe('JsonFormatter', () => { total: 24719, cached: 10656, thoughts: 103, - tool: 0, }, bySource: {}, }, @@ -80,7 +79,6 @@ describe('JsonFormatter', () => { total: 21657, cached: 0, thoughts: 138, - tool: 0, }, bySource: {}, }, diff --git a/packages/core/src/telemetry/loggers.test.ts b/packages/core/src/telemetry/loggers.test.ts index 506c68739..23847a1c8 100644 --- a/packages/core/src/telemetry/loggers.test.ts +++ b/packages/core/src/telemetry/loggers.test.ts @@ -304,7 +304,6 @@ describe('loggers', () => { candidatesTokenCount: 50, cachedContentTokenCount: 10, thoughtsTokenCount: 5, - toolUsePromptTokenCount: 2, }; const event = new ApiResponseEvent( 'test-response-id', @@ -333,7 +332,6 @@ describe('loggers', () => { output_token_count: 50, cached_content_token_count: 10, thoughts_token_count: 5, - tool_token_count: 2, total_token_count: 0, response_text: 'test-response', prompt_id: 'prompt-id-1', diff --git a/packages/core/src/telemetry/loggers.ts b/packages/core/src/telemetry/loggers.ts index a759ef26f..b2480c135 100644 --- a/packages/core/src/telemetry/loggers.ts +++ b/packages/core/src/telemetry/loggers.ts @@ -509,10 +509,6 @@ export function logApiResponse(config: Config, event: ApiResponseEvent): void { model: event.model, type: 'thought', }); - recordTokenUsageMetrics(config, event.tool_token_count, { - model: event.model, - type: 'tool', - }); } export function logLoopDetected( diff --git a/packages/core/src/telemetry/metrics.test.ts b/packages/core/src/telemetry/metrics.test.ts index e90602af1..2ee3a96e2 100644 --- a/packages/core/src/telemetry/metrics.test.ts +++ b/packages/core/src/telemetry/metrics.test.ts @@ -216,16 +216,6 @@ describe('Telemetry Metrics', () => { model: 'gemini-pro', type: 'cache', }); - - recordTokenUsageMetricsModule(mockConfig, 125, { - model: 'gemini-pro', - type: 'tool', - }); - expect(mockCounterAddFn).toHaveBeenCalledWith(125, { - 'session.id': 'test-session-id', - model: 'gemini-pro', - type: 'tool', - }); }); it('should handle different models', () => { diff --git a/packages/core/src/telemetry/metrics.ts b/packages/core/src/telemetry/metrics.ts index 1b87d78e9..bcd577a28 100644 --- a/packages/core/src/telemetry/metrics.ts +++ b/packages/core/src/telemetry/metrics.ts @@ -86,7 +86,7 @@ const COUNTER_DEFINITIONS = { assign: (c: Counter) => (tokenUsageCounter = c), attributes: {} as { model: string; - type: 'input' | 'output' | 'thought' | 'cache' | 'tool'; + type: 'input' | 'output' | 'thought' | 'cache'; }, }, [SESSION_COUNT]: { diff --git a/packages/core/src/telemetry/qwen-logger/qwen-logger.ts b/packages/core/src/telemetry/qwen-logger/qwen-logger.ts index a6a6c9ace..2be88e625 100644 --- a/packages/core/src/telemetry/qwen-logger/qwen-logger.ts +++ b/packages/core/src/telemetry/qwen-logger/qwen-logger.ts @@ -623,7 +623,6 @@ export class QwenLogger { output_token_count: event.output_token_count, cached_content_token_count: event.cached_content_token_count, thoughts_token_count: event.thoughts_token_count, - tool_token_count: event.tool_token_count, }), }); diff --git a/packages/core/src/telemetry/types.ts b/packages/core/src/telemetry/types.ts index 4a9335434..764147297 100644 --- a/packages/core/src/telemetry/types.ts +++ b/packages/core/src/telemetry/types.ts @@ -333,7 +333,6 @@ export class ApiResponseEvent implements BaseTelemetryEvent { output_token_count: number; cached_content_token_count: number; thoughts_token_count: number; - tool_token_count: number; total_token_count: number; response_text?: string; prompt_id: string; @@ -364,7 +363,6 @@ export class ApiResponseEvent implements BaseTelemetryEvent { this.output_token_count = usage_data?.candidatesTokenCount ?? 0; this.cached_content_token_count = usage_data?.cachedContentTokenCount ?? 0; this.thoughts_token_count = usage_data?.thoughtsTokenCount ?? 0; - this.tool_token_count = usage_data?.toolUsePromptTokenCount ?? 0; this.total_token_count = usage_data?.totalTokenCount ?? 0; this.response_text = response_text; this.prompt_id = prompt_id; diff --git a/packages/core/src/telemetry/uiTelemetry.test.ts b/packages/core/src/telemetry/uiTelemetry.test.ts index 311aac4f9..aa7ee6d56 100644 --- a/packages/core/src/telemetry/uiTelemetry.test.ts +++ b/packages/core/src/telemetry/uiTelemetry.test.ts @@ -159,7 +159,6 @@ describe('UiTelemetryService', () => { total_token_count: 30, cached_content_token_count: 5, thoughts_token_count: 2, - tool_token_count: 3, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; service.addEvent(event); @@ -181,7 +180,6 @@ describe('UiTelemetryService', () => { total_token_count: 30, cached_content_token_count: 5, thoughts_token_count: 2, - tool_token_count: 3, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; service.addEvent(event); @@ -199,7 +197,6 @@ describe('UiTelemetryService', () => { total: 30, cached: 5, thoughts: 2, - tool: 3, }, }; expect(metrics.models['gemini-2.5-pro']).toEqual({ @@ -221,7 +218,6 @@ describe('UiTelemetryService', () => { total_token_count: 30, cached_content_token_count: 5, thoughts_token_count: 2, - tool_token_count: 3, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE; }; @@ -234,7 +230,6 @@ describe('UiTelemetryService', () => { total_token_count: 40, cached_content_token_count: 10, thoughts_token_count: 4, - tool_token_count: 6, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE; }; @@ -255,7 +250,6 @@ describe('UiTelemetryService', () => { total: 70, cached: 15, thoughts: 6, - tool: 9, }, }; expect(metrics.models['gemini-2.5-pro']).toEqual({ @@ -277,7 +271,6 @@ describe('UiTelemetryService', () => { total_token_count: 30, cached_content_token_count: 5, thoughts_token_count: 2, - tool_token_count: 3, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE; }; @@ -290,7 +283,6 @@ describe('UiTelemetryService', () => { total_token_count: 300, cached_content_token_count: 50, thoughts_token_count: 20, - tool_token_count: 30, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE; }; @@ -331,7 +323,6 @@ describe('UiTelemetryService', () => { total: 0, cached: 0, thoughts: 0, - tool: 0, }, }; expect(metrics.models['gemini-2.5-pro']).toEqual({ @@ -352,7 +343,6 @@ describe('UiTelemetryService', () => { total_token_count: 30, cached_content_token_count: 5, thoughts_token_count: 2, - tool_token_count: 3, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE; }; @@ -379,7 +369,6 @@ describe('UiTelemetryService', () => { total: 30, cached: 5, thoughts: 2, - tool: 3, }, }; expect(metrics.models['gemini-2.5-pro']).toEqual({ @@ -402,7 +391,6 @@ describe('UiTelemetryService', () => { total_token_count: 15, cached_content_token_count: 0, thoughts_token_count: 0, - tool_token_count: 0, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; service.addEvent(event); @@ -423,7 +411,6 @@ describe('UiTelemetryService', () => { total_token_count: 150, cached_content_token_count: 20, thoughts_token_count: 0, - tool_token_count: 0, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; const subagentEvent = { 'event.name': EVENT_API_RESPONSE, @@ -434,7 +421,6 @@ describe('UiTelemetryService', () => { total_token_count: 50, cached_content_token_count: 0, thoughts_token_count: 0, - tool_token_count: 0, subagent_name: 'echoer', } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; @@ -471,7 +457,6 @@ describe('UiTelemetryService', () => { total_token_count: 15, cached_content_token_count: 0, thoughts_token_count: 0, - tool_token_count: 0, subagent_name: subagentName, }) as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; @@ -504,7 +489,6 @@ describe('UiTelemetryService', () => { total_token_count: 15, cached_content_token_count: 0, thoughts_token_count: 0, - tool_token_count: 0, subagent_name: 'constructor', } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; @@ -767,7 +751,6 @@ describe('UiTelemetryService', () => { total_token_count: 300, cached_content_token_count: 50, thoughts_token_count: 20, - tool_token_count: 30, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; service.addEvent(event); @@ -792,7 +775,6 @@ describe('UiTelemetryService', () => { total_token_count: 300, cached_content_token_count: 50, thoughts_token_count: 20, - tool_token_count: 30, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; service.addEvent(event); @@ -817,7 +799,6 @@ describe('UiTelemetryService', () => { total_token_count: 300, cached_content_token_count: 50, thoughts_token_count: 20, - tool_token_count: 30, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; service.addEvent(event); @@ -849,7 +830,6 @@ describe('UiTelemetryService', () => { total_token_count: 300, cached_content_token_count: 50, thoughts_token_count: 20, - tool_token_count: 30, } as ApiResponseEvent & { 'event.name': typeof EVENT_API_RESPONSE }; service.addEvent(event); diff --git a/packages/core/src/telemetry/uiTelemetry.ts b/packages/core/src/telemetry/uiTelemetry.ts index d4639bec3..c148a9579 100644 --- a/packages/core/src/telemetry/uiTelemetry.ts +++ b/packages/core/src/telemetry/uiTelemetry.ts @@ -62,7 +62,6 @@ export interface ModelMetricsCore { total: number; cached: number; thoughts: number; - tool: number; }; } @@ -109,7 +108,6 @@ const createInitialModelMetricsCore = (): ModelMetricsCore => ({ total: 0, cached: 0, thoughts: 0, - tool: 0, }, }); @@ -241,7 +239,6 @@ export class UiTelemetryService extends EventEmitter { bucket.tokens.total += event.total_token_count; bucket.tokens.cached += event.cached_content_token_count; bucket.tokens.thoughts += event.thoughts_token_count; - bucket.tokens.tool += event.tool_token_count; } } diff --git a/packages/vscode-ide-companion/src/services/qwenSessionReader.ts b/packages/vscode-ide-companion/src/services/qwenSessionReader.ts index 93303c6d8..4e8ce1c40 100644 --- a/packages/vscode-ide-companion/src/services/qwenSessionReader.ts +++ b/packages/vscode-ide-companion/src/services/qwenSessionReader.ts @@ -24,7 +24,6 @@ export interface QwenMessage { output: number; cached: number; thoughts: number; - tool: number; total: number; }; model?: string;