Skip to content

ModelCapabilities

🛈 DocStrings

Capabilities of a model.

Source code in src/tokonomics/toko_types.py
@dataclass(frozen=True, slots=True)
class ModelCapabilities:
    """Capabilities of a model."""

    max_tokens: int
    """Legacy parameter for maximum tokens"""
    max_input_tokens: int
    """Maximum input tokens supported"""
    max_output_tokens: int
    """Maximum output tokens supported"""
    litellm_provider: str | None
    """LiteLLM provider name"""
    mode: str | None
    """Model operation mode"""
    supports_function_calling: bool
    """Whether the model supports function calling"""
    supports_parallel_function_calling: bool
    """Whether the model supports parallel function calling"""
    supports_vision: bool
    """Whether the model supports vision/image input"""
    supports_audio_input: bool
    """Whether the model supports audio input"""
    supports_audio_output: bool
    """Whether the model supports audio output"""
    supports_prompt_caching: bool
    """Whether the model supports prompt caching"""
    supports_response_schema: bool
    """Whether the model supports response schema"""
    supports_system_messages: bool
    """Whether the model supports system messages"""

litellm_provider instance-attribute

litellm_provider: str | None

LiteLLM provider name

max_input_tokens instance-attribute

max_input_tokens: int

Maximum input tokens supported

max_output_tokens instance-attribute

max_output_tokens: int

Maximum output tokens supported

max_tokens instance-attribute

max_tokens: int

Legacy parameter for maximum tokens

mode instance-attribute

mode: str | None

Model operation mode

supports_audio_input instance-attribute

supports_audio_input: bool

Whether the model supports audio input

supports_audio_output instance-attribute

supports_audio_output: bool

Whether the model supports audio output

supports_function_calling instance-attribute

supports_function_calling: bool

Whether the model supports function calling

supports_parallel_function_calling instance-attribute

supports_parallel_function_calling: bool

Whether the model supports parallel function calling

supports_prompt_caching instance-attribute

supports_prompt_caching: bool

Whether the model supports prompt caching

supports_response_schema instance-attribute

supports_response_schema: bool

Whether the model supports response schema

supports_system_messages instance-attribute

supports_system_messages: bool

Whether the model supports system messages

supports_vision instance-attribute

supports_vision: bool

Whether the model supports vision/image input

:fa-brands-github: Show source on GitHub