# cache_identity_params

> **Function** in `deepagents_code`

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

Project the params that participate in prompt-cache identity.

## Signature

```python
cache_identity_params(
    model_params: Mapping[str, Any] | None,
    *,
    model_spec: str | None = None,
) -> dict[str, Any]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `model_params` | `Mapping[str, Any] \| None` | Yes | Full invocation params, or `None`. |
| `model_spec` | `str \| None` | No | Optional `provider:model` spec used for model-specific keys. (default: `None`) |

## Returns

`dict[str, Any]`

Cache-identity entries, excluding unrelated invocation knobs.

---

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