# is_update_available

> **Function** in `deepagents_code`

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

Check whether a newer version of deepagents-code is available.

When the installed version is a pre-release (e.g. `0.0.35a1`),
pre-release versions on PyPI are included in the comparison so alpha
testers are notified of newer alphas and the eventual stable release.
Stable installs only compare against stable PyPI releases unless
`include_prereleases` is explicitly set.

## Signature

```python
is_update_available(
    *,
    bypass_cache: bool = False,
    include_prereleases: bool | None = None,
) -> tuple[bool, str | None]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `bypass_cache` | `bool` | No | Skip the cache and always hit PyPI. (default: `False`) |
| `include_prereleases` | `bool \| None` | No | Override whether alpha/beta/rc releases are considered. When `None`, this follows the installed version. (default: `None`) |

## Returns

`tuple[bool, str | None]`

A `(available, latest)` tuple.

`latest` is the PyPI version string when it was fetched and parsed
successfully, or `None` when the PyPI check itself fails (network
error, unparseable response, or non-PEP 440 installed version).
`available` is `True` only when `latest` is strictly newer than
the installed version. Callers can therefore distinguish "already
up to date" (`(False, "1.2.3")`) from "could not reach PyPI"
(`(False, None)`).

---

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