# UnknownProviderError

> **Class** in `deepagents_code`

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

Raised when neither the app nor `init_chat_model` can infer a provider.

Carries the offending model spec as an attribute and exposes
`PROVIDERS_DOCS_URL` as a class-level constant so callers can render
a clickable link without string-scanning the formatted message. This
mirrors how `MissingCredentialsError` exposes `provider` / `env_var`
for targeted recovery hints.

## Signature

```python
UnknownProviderError(
    self,
    *,
    model_spec: str,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `model_spec` | `str` | Yes | The bare model name the user supplied (e.g. `'mystery-model'`). When the input had a `provider:model` form, parsing succeeds and this exception does not fire. |

## Extends

- `ModelConfigError`

## Constructors

```python
__init__(
    self,
    *,
    model_spec: str,
) -> None
```

| Name | Type |
|------|------|
| `model_spec` | `str` |


## Properties

- `docs_url`
- `model_spec`

---

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