We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b24baf9 commit 763bf64Copy full SHA for 763bf64
1 file changed
packages/opencode/src/session/index.ts
@@ -316,14 +316,22 @@ export namespace Session {
316
const tokens = {
317
total,
318
input: adjustedInputTokens,
319
- output: safe(outputTokens - reasoningTokens),
+ output: safe(Math.max(0, outputTokens - reasoningTokens)),
320
reasoning: reasoningTokens,
321
cache: {
322
write: cacheWriteInputTokens,
323
read: cacheReadInputTokens,
324
},
325
}
326
327
+ if (reasoningTokens > outputTokens) {
328
+ log.warn("reasoningTokens exceeds outputTokens", {
329
+ model: input.model.id,
330
+ outputTokens,
331
+ reasoningTokens,
332
+ })
333
+ }
334
+
335
// kilocode_change start - Use provider-reported cost when available for OpenRouter/Kilo
336
const reported = KiloSession.providerCost({
337
metadata: input.metadata,
0 commit comments