Skip to content

PostModelSwitchHookInput

Base classes

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

⋔ Inheritance diagram

graph TD
  629305227["hooks.PostModelSwitchHookInput"]
  2645524081["builtins.dict"]
  2751680898["builtins.object"]
  2645524081 --> 629305227
  2751680898 --> 2645524081

🛈 DocStrings

Bases: BaseHookInput

Input data for PostModelSwitch hook events (after the session model changed).

Source code in src/clawd_code_sdk/models/hooks.py
class PostModelSwitchHookInput(BaseHookInput):
    """Input data for PostModelSwitch hook events (after the session model changed)."""

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

:fa-brands-github: Show source on GitHub