All Products
Search
Document Center

PolarDB:AI_DropModel

Last Updated:Mar 28, 2026

Deletes an AI model and removes its record from the polar_ai._ai_models table. Built-in models whose names start with an underscore (_) cannot be deleted.

Syntax

boolean AI_DropModel(text model_id);

Parameters

ParameterDescription
model_idThe name of the existing AI model to delete.

Return values

Return valueDescription
tThe model was deleted successfully.
fThe deletion failed.

Usage notes

  • Deleting a model also removes its corresponding record from the polar_ai._ai_models table.

  • Built-in models cannot be deleted. Built-in model names start with an underscore (_), such as _dashscope/text_embedding/text_embedding_v2.

Example

SELECT polar_ai.AI_DropModel('my_text_embedding_model');