fix: count reasoning tokens (#2187)
This commit is contained in:
@@ -1680,7 +1680,7 @@ export namespace Session {
|
|||||||
const tokens = {
|
const tokens = {
|
||||||
input: usage.inputTokens ?? 0,
|
input: usage.inputTokens ?? 0,
|
||||||
output: usage.outputTokens ?? 0,
|
output: usage.outputTokens ?? 0,
|
||||||
reasoning: 0,
|
reasoning: usage?.reasoningTokens ?? 0,
|
||||||
cache: {
|
cache: {
|
||||||
write: (metadata?.["anthropic"]?.["cacheCreationInputTokens"] ??
|
write: (metadata?.["anthropic"]?.["cacheCreationInputTokens"] ??
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
|
|||||||
Reference in New Issue
Block a user