Skip to content

Add support for completion_tokens_details #258

Open
@nezhyborets

Description

@nezhyborets

Is your feature request related to a problem? Please describe.
While reviewing #255 that improves support for Reasoning Models, in the reasoning models guide I saw that they made changes to usage.completion_tokens_details. We don't have the field at all, so it was impossible to implement all the changes discussed in the guide.

Describe the solution you'd like
Add completionTokenDetails: CompletionTokensDetails to ChatResult.CompletionUsage. See if it can be non-optional. See if its fields can be non-optional.

Additional context
Completion tokens details and its fields seem to appear only in special cases: Predicted Outputs, Reasoning Models, Audio input. So it may be hard to test, debug and research, because currently Demo doesn't support any of the listed features. Here is a task that may be related #257

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions