Description
There is an issue in sessions index.ts where there is a possibility to get negative amount of tokens, as code assumes that input tokens have cached in it. And if cached amount is more than input amount - we got negative. Nothing prevents it.
This can cause issues on analytics tools which are using sessions data assuming tokens always positive.
Plugins
superpowers, DCP
OpenCode version
1.2.15
Steps to reproduce
I faced it with minimax-m2.5 on nanoGPT I believe, if you want to reproduce. At least according to my agent ;) As I used 4 different models within that session, and not completely sure.
Screenshot and/or share link
No response
Operating System
WSL (ubuntu 20.04)
Terminal
No response
Description
There is an issue in sessions index.ts where there is a possibility to get negative amount of tokens, as code assumes that input tokens have cached in it. And if cached amount is more than input amount - we got negative. Nothing prevents it.
This can cause issues on analytics tools which are using sessions data assuming tokens always positive.
Plugins
superpowers, DCP
OpenCode version
1.2.15
Steps to reproduce
I faced it with minimax-m2.5 on nanoGPT I believe, if you want to reproduce. At least according to my agent ;) As I used 4 different models within that session, and not completely sure.
Screenshot and/or share link
No response
Operating System
WSL (ubuntu 20.04)
Terminal
No response