@xtruder/opencode-claude-max-plugin 0.2.3 → 0.2.4
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/build/index.js +4 -4
- package/build/server.js +4 -4
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -428,8 +428,8 @@ function convertStream(anthropicStream, modelId) {
|
|
|
428
428
|
finishReason,
|
|
429
429
|
usage: {
|
|
430
430
|
inputTokens: {
|
|
431
|
-
total: inputTokens ?? 0,
|
|
432
|
-
noCache:
|
|
431
|
+
total: (inputTokens ?? 0) + (cachedInputTokens ?? 0) + (cacheCreationTokens ?? 0),
|
|
432
|
+
noCache: inputTokens ?? 0,
|
|
433
433
|
cacheRead: cachedInputTokens ?? 0,
|
|
434
434
|
cacheWrite: cacheCreationTokens ?? 0
|
|
435
435
|
},
|
|
@@ -864,8 +864,8 @@ class AnthropicSDKModel {
|
|
|
864
864
|
finishReason: mapFinishReason2(response.stop_reason),
|
|
865
865
|
usage: {
|
|
866
866
|
inputTokens: {
|
|
867
|
-
total: response.usage.input_tokens,
|
|
868
|
-
noCache:
|
|
867
|
+
total: response.usage.input_tokens + cacheReadTokens + cacheCreateTokens,
|
|
868
|
+
noCache: response.usage.input_tokens,
|
|
869
869
|
cacheRead: cacheReadTokens,
|
|
870
870
|
cacheWrite: cacheCreateTokens
|
|
871
871
|
},
|
package/build/server.js
CHANGED
|
@@ -428,8 +428,8 @@ function convertStream(anthropicStream, modelId) {
|
|
|
428
428
|
finishReason,
|
|
429
429
|
usage: {
|
|
430
430
|
inputTokens: {
|
|
431
|
-
total: inputTokens ?? 0,
|
|
432
|
-
noCache:
|
|
431
|
+
total: (inputTokens ?? 0) + (cachedInputTokens ?? 0) + (cacheCreationTokens ?? 0),
|
|
432
|
+
noCache: inputTokens ?? 0,
|
|
433
433
|
cacheRead: cachedInputTokens ?? 0,
|
|
434
434
|
cacheWrite: cacheCreationTokens ?? 0
|
|
435
435
|
},
|
|
@@ -864,8 +864,8 @@ class AnthropicSDKModel {
|
|
|
864
864
|
finishReason: mapFinishReason2(response.stop_reason),
|
|
865
865
|
usage: {
|
|
866
866
|
inputTokens: {
|
|
867
|
-
total: response.usage.input_tokens,
|
|
868
|
-
noCache:
|
|
867
|
+
total: response.usage.input_tokens + cacheReadTokens + cacheCreateTokens,
|
|
868
|
+
noCache: response.usage.input_tokens,
|
|
869
869
|
cacheRead: cacheReadTokens,
|
|
870
870
|
cacheWrite: cacheCreateTokens
|
|
871
871
|
},
|
package/package.json
CHANGED