from pydantic import BaseModel, Field


class CompletionTokensDetails(BaseModel):
    reasoning_tokens: int = Field(
        description="Tokens generated by the model for reasoning."
    )


class Usage(BaseModel):
    completion_tokens: int = Field(
        description="Number of tokens in the generated completion."
    )

    prompt_tokens: int = Field(description="Number of tokens in the prompt.")

    total_tokens: int = Field(
        description="Total number of tokens used in the"
        " request (prompt + completion)"
    )

    completion_tokens_details: CompletionTokensDetails = Field(
        description="Breakdown of tokens used in a completion."
    )
