@alpaca-editor/core 1.0.4123 → 1.0.4128

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpaca-editor/core",
3
- "version": "1.0.4123",
3
+ "version": "1.0.4128",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -71,7 +71,9 @@ export function AgentCostDisplay({
71
71
  outputTokens: number,
72
72
  cachedTokens: number,
73
73
  ) => {
74
- const inputCost = (inputTokens / 1000000) * 3; // $3 per million tokens
74
+ // Cached tokens are a subset of input tokens, not additional tokens
75
+ const freshInputTokens = inputTokens - cachedTokens;
76
+ const inputCost = (freshInputTokens / 1000000) * 3; // $3 per million tokens
75
77
  const outputCost = (outputTokens / 1000000) * 15; // $15 per million tokens
76
78
  const cachedCost = (cachedTokens / 1000000) * 0.3; // Cached tokens are typically much cheaper
77
79
  return {