ModelUsage
junjo.agent.messages.ModelUsage
Kind: Class
SDK version: 0.64.0
Documentation channel: Next source preview
Signature
Section titled “Signature”ModelUsage(*, input_tokens: int | None = None, output_tokens: int | None = None, cached_input_tokens: int | None = None, reasoning_tokens: int | None = None, total_tokens: int | None = None)Optional provider-reported token facts for one validated model response.
Constructor
Section titled “Constructor”Record optional nonnegative provider token facts.
Omitted and reported-zero values remain distinct. Every supplied value must be a portable I-JSON integer.
Members
Section titled “Members”input_tokens
Section titled “input_tokens”input_tokens: int | NonePublic attribute.
output_tokens
Section titled “output_tokens”output_tokens: int | NonePublic attribute.
cached_input_tokens
Section titled “cached_input_tokens”cached_input_tokens: int | NonePublic attribute.
reasoning_tokens
Section titled “reasoning_tokens”reasoning_tokens: int | NonePublic attribute.
total_tokens
Section titled “total_tokens”total_tokens: int | NonePublic attribute.
to_json
Section titled “to_json”to_json() -> dict[str, int]Return the contract JSON shape, omitting unsupported facts.