# ModelLabel

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/ModelLabel)

A label that displays a model name with smart truncation.

When the full `provider:model` text doesn't fit, the provider is dropped
first. If the bare model name still doesn't fit, it is left-truncated
with a leading ellipsis so the most distinctive tail stays visible.

When a reasoning effort is set, its label is appended to the model and
participates in the same ladder: the effort suffix is preserved (with the
model left-truncated to make room) and is only dropped once even the
left-truncated model plus effort cannot fit.

Whatever text survives that ladder is also a hit target: clicking the model
span opens the model selector and clicking the effort span opens the reasoning
effort picker, via the `_PICKER_ACTIONS` app actions. A span that the ladder
dropped is not clickable, because only rendered text carries the metadata.

## Signature

```python
ModelLabel()
```

## Extends

- `Widget`

## Properties

- `provider`
- `model`
- `effort`

## Methods

- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/ModelLabel/on_mount)
- [`on_unmount()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/ModelLabel/on_unmount)
- [`on_click()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/ModelLabel/on_click)
- [`on_mouse_move()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/ModelLabel/on_mouse_move)
- [`on_leave()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/ModelLabel/on_leave)
- [`get_content_width()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/ModelLabel/get_content_width)
- [`render()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/status/ModelLabel/render)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/02ed19a42715fe0e9f2059fe8cf4fe6883054f08/libs/code/deepagents_code/tui/widgets/status.py#L115)