# load_trusted_cache_endpoints

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/cold_cache/load_trusted_cache_endpoints)

Read `[warnings].trusted_cache_endpoints` as a set of hostnames.

Entries declare that an alternate endpoint forwards cache-affecting request
fields (`cache_control`, `prompt_cache_key`, `prompt_cache_retention`) and
honors the upstream provider's documented retention.

Trust is matched on the exact host: trusting `example.com` does not trust
`gw.example.com`. Each host a request may actually reach must be listed.

Malformed *content* never raises: an unusable entry is dropped and a value
that is not a list is ignored wholesale. Because a dropped entry silently
leaves the warning disabled -- the opposite of what the user edited the
file to achieve -- the offending entry is logged by value and a non-list
value by type. Each distinct rejection is logged once per process.

## Signature

```python
load_trusted_cache_endpoints(
    config: dict[str, Any] | None = None,
) -> frozenset[str]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config` | `dict[str, Any] \| None` | No | Parsed user `config.toml` table. When omitted, the option is resolved through the shared process generation, with managed configuration taking precedence -- no disk read, so a hand edit needs `/reload` to take effect. (default: `None`) |

## Returns

`frozenset[str]`

Lowercase hostnames of configured trusted endpoints (possibly empty).

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/cold_cache.py#L652)