Drop transcription/analysis cost lines from logs

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> in / <out> out — cost: $X" (chunked transcription)
  • "Transcription tokens: <in>/<out> — cost: $X" (single-shot)
  • "Analysis tokens: <in>/<out>/<thinking> — 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.
This commit is contained in:
Keysat
2026-05-08 12:50:10 -05:00
parent f6c1a1e830
commit a226113a10
+2 -15
View File
@@ -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