Skip to content

PreModelSwitchHookInput

Base classes

Name Children Inherits
dict
builtins
dict() -> new empty dictionary

⋔ Inheritance diagram

graph TD
  1827468415["hooks.PreModelSwitchHookInput"]
  2645524081["builtins.dict"]
  2751680898["builtins.object"]
  2645524081 --> 1827468415
  2751680898 --> 2645524081

🛈 DocStrings

Bases: BaseHookInput

Input data for PreModelSwitch hook events (before the session model changes).

Source code in src/clawd_code_sdk/models/hooks.py
class PreModelSwitchHookInput(BaseHookInput):
    """Input data for PreModelSwitch hook events (before the session model changes)."""

    hook_event_name: Literal["PreModelSwitch"]
    from_model: str
    to_model: str
    requested_model: str | None
    source: Literal["command", "picker", "sdk"]
    context_tokens: int
    prompt_cache_warm: bool
    cache_ttl: ModelSwitchCacheTtl
    estimated_cache_write_usd: float
    pricing: ModelSwitchPricing

:fa-brands-github: Show source on GitHub