mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix cost
This commit is contained in:
parent
db2bb32bcf
commit
4a6e36a404
1 changed files with 2 additions and 2 deletions
|
|
@ -633,8 +633,8 @@ export namespace Session {
|
|||
}
|
||||
return {
|
||||
cost: new Decimal(0)
|
||||
.add(new Decimal(tokens.input).mul(model.cost.input))
|
||||
.add(new Decimal(tokens.output).mul(model.cost.output))
|
||||
.add(new Decimal(tokens.input).mul(model.cost.input).div(1_000_000))
|
||||
.add(new Decimal(tokens.output).mul(model.cost.output).div(1_000_000))
|
||||
.toNumber(),
|
||||
tokens,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue