# ModelSwitchWarningScreen

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/modals/model_switch/ModelSwitchWarningScreen)

Confirm a model switch that preserves a large conversation context.

## Signature

```python
ModelSwitchWarningScreen(
    self,
    *,
    current_model: str,
    target_model: str,
    context_tokens: int,
    threshold: int,
    approximate: bool,
)
```

## Extends

- `ModalScreen[bool]`

## Constructors

```python
__init__(
    self,
    *,
    current_model: str,
    target_model: str,
    context_tokens: int,
    threshold: int,
    approximate: bool,
) -> None
```

| Name | Type |
|------|------|
| `current_model` | `str` |
| `target_model` | `str` |
| `context_tokens` | `int` |
| `threshold` | `int` |
| `approximate` | `bool` |


## Properties

- `can_focus`
- `BINDINGS`
- `CSS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/tui/modals/model_switch/ModelSwitchWarningScreen/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/modals/model_switch/ModelSwitchWarningScreen/on_mount)
- [`action_confirm()`](https://reference.langchain.com/python/deepagents-code/tui/modals/model_switch/ModelSwitchWarningScreen/action_confirm)
- [`action_cancel()`](https://reference.langchain.com/python/deepagents-code/tui/modals/model_switch/ModelSwitchWarningScreen/action_cancel)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/tui/modals/model_switch.py#L19)