Skip to content

Commit 1f57b9a

Browse files
authored
fix: count reasoning tokens (#2187)
1 parent 004f53f commit 1f57b9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/opencode/src/session/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ export namespace Session {
16801680
const tokens = {
16811681
input: usage.inputTokens ?? 0,
16821682
output: usage.outputTokens ?? 0,
1683-
reasoning: 0,
1683+
reasoning: usage?.reasoningTokens ?? 0,
16841684
cache: {
16851685
write: (metadata?.["anthropic"]?.["cacheCreationInputTokens"] ??
16861686
// @ts-expect-error

0 commit comments

Comments
 (0)