From a226113a104dedb046ddd29e870318715f5fd6dc Mon Sep 17 00:00:00 2001 From: Keysat Date: Fri, 8 May 2026 12:50:10 -0500 Subject: [PATCH] Drop transcription/analysis cost lines from logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cost breakdowns (token counts + dollar figures) are tied to the hardcoded Gemini PRICING table, which won't make sense once we add OpenAI/Claude/local providers — different APIs report tokens differently, some are free, and the pricing table can't keep up. Drop the cost and token-count lines from the activity log so the per-step timing is the durable signal we keep. Removed: • "Total cost: in / out — cost: $X" (chunked transcription) • "Transcription tokens: / — cost: $X" (single-shot) • "Analysis tokens: // — cost: $X" • "Pipeline finished in Ns — total cost: $X (Y tokens)" → now just "Pipeline finished in Ns" Cost calculation helpers (calcCost, PRICING) stay in the codebase for now — they may come back via a per-provider plugin layer later. They just no longer write to the activity-log stream. --- server/index.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/server/index.js b/server/index.js index c6084b7..a07979c 100644 --- a/server/index.js +++ b/server/index.js @@ -2459,19 +2459,13 @@ Return ONLY the timestamped transcript, nothing else.`; } if (allEntries.length > 0) allEntries[allEntries.length - 1].duration = 15; - // Calculate total cost for chunked transcription - const rates = PRICING[modelName] || PRICING["default"]; - const totalCostNum = (totalIn / 1e6) * rates.input + (totalOut / 1e6) * rates.output; - const costDisplay = totalCostNum < 0.01 ? `$${(totalCostNum * 100).toFixed(3)}¢` : `$${totalCostNum.toFixed(4)}`; - logFn(`Chunked transcription complete: ${allEntries.length} total segments`); - logFn(`Total cost: ${totalIn.toLocaleString()} in / ${totalOut.toLocaleString()} out — cost: ${costDisplay}`); return { entries: allEntries, cost: { inputTokens: totalIn, outputTokens: totalOut, thinkingTokens: 0, totalTokens: totalIn + totalOut, - totalCost: String(totalCostNum), totalCostDisplay: costDisplay, + totalCost: "0", totalCostDisplay: "", }, }; } finally { @@ -2516,7 +2510,6 @@ Return ONLY the timestamped transcript, nothing else.`; txCost = calcCost(transcriptionModel, txUsage); const txTime = ((Date.now() - txStart) / 1000).toFixed(1); log(2, `Transcription complete in ${txTime}s`, `${transcriptText.length} chars received`); - log(2, `Transcription tokens: ${txCost.inputTokens.toLocaleString()} in / ${txCost.outputTokens.toLocaleString()} out${txCost.thinkingTokens ? ` / ${txCost.thinkingTokens.toLocaleString()} thinking` : ""} — cost: ${txCost.totalCostDisplay}`); entries = parseTimestampedTranscript(transcriptText); log(2, `Parsed ${entries.length} transcript segments`); @@ -2640,13 +2633,7 @@ Return ONLY the timestamped transcript, nothing else.`; const totalTime = ((Date.now() - pipelineStart) / 1000).toFixed(1); log(3, `Topic analysis complete in ${anaTime}s — found ${chunks.length} topics`); - log(3, `Analysis tokens: ${anaCost.inputTokens.toLocaleString()} in / ${anaCost.outputTokens.toLocaleString()} out${anaCost.thinkingTokens ? ` / ${anaCost.thinkingTokens.toLocaleString()} thinking` : ""} — cost: ${anaCost.totalCostDisplay}`); - - // Total cost summary - const totalCostNum = parseFloat(txCost.totalCost) + parseFloat(anaCost.totalCost); - const totalCostDisplay = totalCostNum < 0.01 ? `$${(totalCostNum * 100).toFixed(3)}¢` : `$${totalCostNum.toFixed(4)}`; - const totalTokens = (txCost.totalTokens + anaCost.totalTokens).toLocaleString(); - log(3, `Pipeline finished in ${totalTime}s — total cost: ${totalCostDisplay} (${totalTokens} tokens)`); + log(3, `Pipeline finished in ${totalTime}s`); // Save to history — skipped for free-tier users so we don't pollute // the host's library with anonymous summaries. The result still streams