You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like to track usage costs. Previously, I manually counted the tokens in the inputs and outputs. However, now that models support multimedia input/output, reasoning tokens, and more, my previous approach is no longer feasible. It would be helpful to provide a --json (e.g., --log-json, --json-out, etc.) option that saves the input/output token count and other metadata to a JSON file. This way, my wrapper can read the exact token usage and compute the costs accordingly.
Including the inputs and outputs in this file would also make it useful for logging. In general, this file offers a way to output information without cluttering stdout and hindering interactive, streaming usage.
The text was updated successfully, but these errors were encountered:
I like to track usage costs. Previously, I manually counted the tokens in the inputs and outputs. However, now that models support multimedia input/output, reasoning tokens, and more, my previous approach is no longer feasible. It would be helpful to provide a
--json
(e.g.,--log-json
,--json-out
, etc.) option that saves the input/output token count and other metadata to a JSON file. This way, my wrapper can read the exact token usage and compute the costs accordingly.Including the inputs and outputs in this file would also make it useful for logging. In general, this file offers a way to output information without cluttering
stdout
and hindering interactive, streaming usage.The text was updated successfully, but these errors were encountered: