# release_prerelease_pins

> **Function** in `deepagents_code`

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

Return the targeted pre-release pins installing `version` requires.

A stable `deepagents-code` release may mandate an exact pre-release
dependency (for example `deepagents==0.7.0a7`). This resolves those pins from
the release's PyPI metadata so command builders can pass them to uv as
first-party constraints — admitting *only* the named pre-release rather than
opting the whole resolution into pre-releases with a global `--prerelease
allow`.

## Signature

```python
release_prerelease_pins(
    version: str | None,
    *,
    bypass_cache: bool = False,
) -> list[str]
```

## Description

**Note:**

On any lookup failure (no `requests`, network/parse error) this returns
`[]` — "no pre-release admission". That is deliberately conservative
rather than fail-safe: the truly safe default would be to admit
pre-releases, but a spurious non-empty result would make
`prerelease_upgrade_supported` *refuse* the upgrade outright on non-uv
installs (Homebrew/other), regressing the common case. `[]` keeps those
installs upgradable; the cost is that, during a PyPI outage, a stable
release that genuinely pins a pre-release dependency may be installed
stable-only (and may then fail to resolve). Failures are logged at
`warning` so the blind decision is at least visible.

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `version` | `str \| None` | Yes | `deepagents-code` version to inspect. |
| `bypass_cache` | `bool` | No | Skip cached release metadata and fetch PyPI directly. (default: `False`) |

## Returns

`list[str]`

A sorted list of exact pin strings (e.g. `["deepagents==0.7.0a7"]`), or
an empty list when the release needs no targeted pre-release
admission.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/update_check.py#L795)