# clear_default_model

> **Function** in `deepagents_cli`

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

Remove the default model from the config file.

Deletes the `[models].default` key so that future launches fall back to
`[models].recent` or environment auto-detection.

## Signature

```python
clear_default_model(
    config_path: Path | None = None,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `Path \| None` | No | Path to config file.  Defaults to `~/.deepagents/config.toml`. (default: `None`) |

## Returns

`bool`

True if the key was removed (or was already absent), False on I/O error.

---

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