expose costs in ai chat response#2921
Conversation
Salazareo
left a comment
There was a problem hiding this comment.
can we call them microCents instead of Ucents
I know thats its meant to be the mu micro symbol, but bit less legible than microCents
updated, the rest of the file + event uses ucents though, so this causes a bit of a naming inconsistency |
well update as we touch it I guess, I didn't realize rest was also using ucents |
|
ignore that, it's back at efd7b19 |
add
usd_centsafter a puter.ai.chat call:usage is same as from puter.auth.getMonthlyUsage:
ai.prompt.cost-calculatedevent shares the same logic for consistencytesting:
tested on openai (with, without cache), claude (with cache), openrouter (special "billedUsage" case) on live keys, deepseek/xai/gemini/mistral on mock servers
closes #2892