# resolve_install_hint

> **Function** in `deepagents_code`

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

Resolve how to recover from a missing provider package.

Centralizes the `extra_for_package` -> `install_package_command` fallback so
the TUI startup hint and the model-initialization error path render
consistent recovery data without each re-implementing the branching and
error handling. Prefers the installable extra; otherwise derives a raw
package install command, degrading to a manual hint (both fields `None`)
when that cannot be determined.

Callers own sentence wording and command framing (for example interactive
`/install` / `/model` copy). This helper only resolves the recovery action.

## Signature

```python
resolve_install_hint(
    package: str,
    distribution_name: str = 'deepagents-code',
) -> InstallHint
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `package` | `str` | Yes | Distribution package name that failed to import. |
| `distribution_name` | `str` | No | Name of the installed distribution to inspect when mapping the package to an extra and when building a raw package install command that preserves already-installed extras. (default: `'deepagents-code'`) |

## Returns

`InstallHint`

An `InstallHint` describing the recommended recovery action.

---

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