Note
This view is available starting with V4.4.1.
Purpose
This view displays the model access information for all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | YES | The ID of the tenant. |
| ENDPOINT_ID | int(20) | NO | The unique ID of the model access information. |
| ENDPOINT_NAME | varchar(128) | NO | The unique name of the model access information, which is specified by the user. |
| AI_MODEL_NAME | varchar(128) | NO | The name of the AI model to which the model access information belongs. |
| SCOPE | varchar(128) | NO | A reserved field. The default value is all. This field is reserved for future use in configuring model access information across regions and zones. |
| URL | varchar(2048) | NO | The URL for calling the model. The URL supports HTTP and HTTPS. Example: https://dashscope.aliyuncs.com/compatible-mode/v1/embeddings. |
| ACCESS_KEY | varchar(2048) | NO | The API key used for calling the model. |
| PROVIDER | varchar(128) | NO | The provider of the AI model. Valid values: openai, aliyun, deepseek, and ollama. This field is used for adapting the API message format. If this field is left empty, you must provide a UDF function. Otherwise, an error will be returned. |
| REQUEST_MODEL_NAME | varchar(128) | YES | The name of the AI model specified in the request message body. Example: bge-m3-custom. |
| PARAMETERS | varchar(2048) | YES | A reserved field. Optional parameters used to configure additional parameters for model calls, such as context_window and max_output_tokens, to support batch operations. Example: {"context_window": 128000,"max_output_tokens": 8000}. |
| REQUEST_TRANSFORM_FN | varchar(64) | YES | A reserved field. Used to construct the request data sent to the AI model. If this field is left empty, the system will use the default message format based on the PROVIDER and the model type (embedding, rerank, or completion) to send the request. |
| RESPONSE_TRANSFORM_FN | varchar(64) | YES | A reserved field. Used to parse the data returned by the AI model. If this field is left empty, the system will use the default response format based on the PROVIDER and the model type (embedding, rerank, or completion) to process the response. |
Sample query
Query the model access information for all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_AI_MODEL_ENDPOINTS;
The query result is as follows:
+-----------+-------------+--------------------+---------------+-------+-------------------+------------------------------------------------------------------+----------+--------------------+------------+----------------------+-----------------------+
| TENANT_ID | ENDPOINT_ID | ENDPOINT_NAME | AI_MODEL_NAME | SCOPE | URL | ACCESS_KEY | PROVIDER | REQUEST_MODEL_NAME | PARAMETERS | REQUEST_TRANSFORM_FN | RESPONSE_TRANSFORM_FN |
+-----------+-------------+--------------------+---------------+-------+-------------------+------------------------------------------------------------------+----------+--------------------+------------+----------------------+-----------------------+
| 1004 | 1 | my_model_endpoint1 | my_ai_model_1 | ALL | your ai model url | EAF8BD8998A38C94B9EA596257E8D05CE4B8309E7134F81A78CCB59D60C39846 | openai | text-embedding-v2 | NULL | NULL | NULL |
+-----------+-------------+--------------------+---------------+-------+-------------------+------------------------------------------------------------------+----------+--------------------+------------+----------------------+-----------------------+
1 row in set
