# ModelRoute

> **Class** in `langchain_openai`

📖 [View in docs](https://reference.langchain.com/python/langchain-openai/middleware/model_router/ModelRoute)

Routing answer stored in agent state under `model_route`.

A plain mapping rather than a `ChoiceAnswer`, so checkpointers can persist it
without registering custom types.

## Signature

```python
ModelRoute()
```

## Extends

- `TypedDict`

## Constructors

```python
__init__(
    choice: str,
    probabilities: dict[str, float],
    confidence: float,
)
```

| Name | Type |
|------|------|
| `choice` | `str` |
| `probabilities` | `dict[str, float]` |
| `confidence` | `float` |


## Properties

- `choice`
- `probabilities`
- `confidence`

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/16a08bda1247010c23fcfa887e421259a5fced5e/libs/partners/openai/langchain_openai/middleware/model_router.py#L57)