> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# DROP AI PROVIDER

> Remove an AI provider from the cluster.

Removes an AI provider from the cluster.

A provider that is currently the default for its type cannot be dropped — set another provider as the
default for that type first (see [`SET DEFAULT AI PROVIDER`](/documents/4.2/sql-reference/sql-statements/cluster-management/ai_provider/SET_DEFAULT_AI_PROVIDER)).

## Syntax

```SQL theme={null}
DROP AI PROVIDER [IF EXISTS] <provider_name>
```

## Parameters

| Parameter | Description |
| - | - |
| `IF EXISTS` | Do nothing (instead of erroring) when the provider does not exist. |
| `provider_name` | Name of the provider to drop. |

## Examples

```sql theme={null}
DROP AI PROVIDER openai;
DROP AI PROVIDER IF EXISTS dashscope_chat;
```

## See also

* [`CREATE AI PROVIDER`](/documents/4.2/sql-reference/sql-statements/cluster-management/ai_provider/CREATE_AI_PROVIDER)
* [`SET DEFAULT AI PROVIDER`](/documents/4.2/sql-reference/sql-statements/cluster-management/ai_provider/SET_DEFAULT_AI_PROVIDER)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.