claudish 3.3.8 → 3.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -57001,10 +57001,11 @@ class OpenAIHandler {
57001
57001
  }
57002
57002
  }
57003
57003
  updateTokenTracking(inputTokens, outputTokens) {
57004
+ const incrementalInputTokens = Math.max(0, inputTokens - this.sessionInputTokens);
57004
57005
  this.sessionInputTokens = inputTokens;
57005
57006
  this.sessionOutputTokens += outputTokens;
57006
57007
  const pricing = this.getPricing();
57007
- const cost = inputTokens / 1e6 * pricing.inputCostPer1M + outputTokens / 1e6 * pricing.outputCostPer1M;
57008
+ const cost = incrementalInputTokens / 1e6 * pricing.inputCostPer1M + outputTokens / 1e6 * pricing.outputCostPer1M;
57008
57009
  this.sessionTotalCost += cost;
57009
57010
  this.writeTokenFile(inputTokens, this.sessionOutputTokens);
57010
57011
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "3.3.8",
3
+ "version": "3.3.9",
4
4
  "description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",