Session.getUsage hardcodes reasoning tokens at the output rate:
// TODO: update models.dev to have better pricing model, for now:
// charge reasoning tokens at the same rate as output tokens
.add(new Decimal(tokens.reasoning).mul(costInfo?.output ?? 0).div(1_000_000))
Models with a distinct reasoning price aren't costed correctly. Add an optional reasoning field to the cost schemas and use it in getUsage, falling back to the output rate when unset. Backward compatible.
Session.getUsagehardcodes reasoning tokens at the output rate:Models with a distinct reasoning price aren't costed correctly. Add an optional
reasoningfield to the cost schemas and use it ingetUsage, falling back to the output rate when unset. Backward compatible.