# suppress_warning

> **Function** in `deepagents_cli`

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

Add a warning key to the suppression list in the config file.

Reads existing config (if any), adds `key` to `[warnings].suppress`,
and writes back using atomic temp-file rename. Deduplicates entries.

## Signature

```python
suppress_warning(
    key: str,
    config_path: Path | None = None,
) -> bool
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `key` | `str` | Yes | Warning identifier to suppress (e.g., `'ripgrep'`). |
| `config_path` | `Path \| None` | No | Path to config file.  Defaults to `~/.deepagents/config.toml`. (default: `None`) |

## Returns

`bool`

`True` if save succeeded, `False` if it failed due to I/O errors.

---

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