# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ...._models import BaseModel

__all__ = ["BetaManagedAgentsSpanModelUsage"]


class BetaManagedAgentsSpanModelUsage(BaseModel):
    """Token usage for a single model request."""

    cache_creation_input_tokens: int
    """Tokens used to create prompt cache in this request."""

    cache_read_input_tokens: int
    """Tokens read from prompt cache in this request."""

    input_tokens: int
    """Input tokens consumed by this request."""

    output_tokens: int
    """Output tokens generated by this request."""

    speed: Optional[Literal["standard", "fast"]] = None
    """Inference speed mode.

    `fast` provides significantly faster output token generation at premium pricing.
    Not all models support `fast`; invalid combinations are rejected at create time.
    """
