# get_model_identifier

> **Function** in `deepagents`

📖 [View in docs](https://reference.langchain.com/python/deepagents/_models/get_model_identifier)

Extract the provider-native model identifier from a chat model.

Providers do not agree on a single field name for the identifier. Some use
`model_name`, while others use `model`. Reading the serialized model config
lets us inspect both without relying on reflective attribute access.

## Signature

```python
get_model_identifier(
    model: BaseChatModel,
) -> str | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `model` | `BaseChatModel` | Yes | Chat model instance to inspect. |

## Returns

`str | None`

The configured model identifier, or `None` if it is unavailable.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0b13f3e0e2726fdb7bbe1e0cf88dac76dbd43b01/libs/deepagents/deepagents/_models.py#L48)