# validate_model_capabilities

> **Function** in `deepagents_code`

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

Validate that the model has required capabilities for `deepagents`.

Checks the model's profile (if available) to ensure it supports tool calling, which
is required for agent functionality. Issues warnings for models without profiles or
with limited context windows.

## Signature

```python
validate_model_capabilities(
    model: BaseChatModel,
    model_name: str,
) -> None
```

## Description

**Note:**

This validation is best-effort. Models without profiles will pass with
a warning. Calls `sys.exit(1)` if the model's profile explicitly
indicates `tool_calling=False`.

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `model` | `BaseChatModel` | Yes | The instantiated model to validate. |
| `model_name` | `str` | Yes | Model name for error/warning messages. |

---

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