# get_model_profiles

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/model_config/get_model_profiles)

Load upstream profiles merged with config.toml overrides.

Keyed by `provider:model` spec string. Each entry contains the
merged profile dict and the set of keys overridden by config.toml.

Unlike `get_available_models()`, this includes all models from upstream
profiles regardless of capability filters (tool calling, text I/O).

Results are cached; use `clear_caches()` to reset. When `cli_override` is
provided the result is stored in a single-slot cache keyed by
`id(cli_override)`. This relies on the caller retaining the same dict
object for the session (the CLI stores it once on the app instance);
passing a different dict with the same contents will bypass the cache
and overwrite the previous entry.

## Signature

```python
get_model_profiles(
    *,
    cli_override: dict[str, Any] | None = None,
) -> Mapping[str, ModelProfileEntry]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `cli_override` | `dict[str, Any] \| None` | No | Extra profile fields from `--profile-override`.  When provided, these are merged on top of every profile entry (after upstream + config.toml) and their keys are added to `overridden_keys`. (default: `None`) |

## Returns

`Mapping[str, ModelProfileEntry]`

Read-only mapping of spec strings to profile entries.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/bb27e62ebe44dd6e8104a504b1718ce87acc7ffa/libs/cli/deepagents_cli/model_config.py#L591)