Abstract token usage

Created on 6 April 2025, about 2 months ago

Problem/Motivation

Currently we only save the raw dump of Metadata, but the actual input and output tokens is of interest as normalized comparable data.

Steps to reproduce

Proposed resolution

Add methods for providers to store
* total token usage
* input token usage
* output token usage
* reasoning token usage
* cached token usage

All should be optional.
Best place is ChatOuput object.

Add to logging.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.1

Component

AI Core module

Created by

🇩🇪Germany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024