The ALTER_AI_MODEL_ENDPOINT procedure is used to modify the access endpoint of an AI model object.
Syntax
PROCEDURE alter_ai_model_endpoint(
IN name VARCHAR(128),
IN params JSON);
Parameters
Parameter |
Description |
Type |
Value range |
Nullability |
|---|---|---|---|---|
| name | The name of the access endpoint for the AI model object. | VARCHAR(128) | NO | |
| params | ai_model_name specifies the name of the AI model object created by the CREATE_AI_MODEL procedure. |
JSON STRING | NO | |
url specifies the complete URL of the AI model service access endpoint, which is the specific interface address for features such as chat, embedding, or reranking, not the base URL. |
JSON STRING | NO | ||
access_key specifies the access key for the endpoint. |
JSON STRING | NO | ||
request_model_name specifies the user-defined model name, such as big-m3-custom, which is placed in the request message body. |
JSON STRING | YES, can be empty or omitted | ||
provider specifies the model provider. |
JSON STRING |
|
NO | |
parameters, which indicates the endpoint's extension parameters and is used to configure the concurrent batch processing behavior of the AI_COMPLETE and AI_EMBED functions when handling multiple lines of data. The value of this field is a JSON string (not a JSON object). It is recommended to use the JSON_OBJECT() function to construct the parameters to avoid complex escape issues. For supported sub-parameters, see the parameters section below.
NoteThis parameter is available starting with V5.0.1. If not configured, the default concurrency range of 10 to 100 is used. |
JSON STRING | YES, can be empty or unspecified |
Parameters field
The parameters field is used to configure concurrency batch processing parameters. The system employs the AIMD adaptive algorithm to dynamically adjust the concurrency based on model service responses, striking a balance between throughput and stability.
Parameter |
Description |
Type |
Default Value |
Nullable |
|---|---|---|---|---|
min_concurrency |
The minimum concurrency. The concurrency does not fall below this value during AIMD adaptive throttling. | int | 10 | YES, can be empty, unspecified, or set to 0 (indicating use of the default value) |
max_concurrency |
The upper limit of concurrency. The initial concurrency equals this value. | int | 100 | YES, can be empty, unspecified, or set to 0 (indicating use of the default value) |
Parameter tuning guidelines are as follows:
- For public cloud APIs (such as OpenAI/DeepSeek), it is recommended that
max_concurrencydoes not exceed 50 to avoid triggering rate limiting. - For self-managed model services, you can appropriately increase it based on computing resources.
- If 429 rate-limiting logs frequently appear, it indicates that
max_concurrencyis too high; you should lower it or rely on adaptive throttling.
Examples
Modify the access endpoint of an AI model object.
CALL DBMS_AI_SERVICE.ALTER_AI_MODEL_ENDPOINT (
'my_model_endpoint1', '{
"access_key" : "sk2-xxxxxxxxxxxx",
"url": "https://api.deepseek.com/chat/completions"
}');
You can modify the concurrency batch processing parameters of an existing endpoint by using the JSON object method (recommended).
CALL DBMS_AI_SERVICE.ALTER_AI_MODEL_ENDPOINT('my_model_endpoint1',
JSON_OBJECT("parameters", '{"min_concurrency": 10, "max_concurrency": 80}')
);
You can modify the concurrency batch processing parameters of an existing endpoint by using the raw JSON string method, which requires double-escaping \\\".
CALL DBMS_AI_SERVICE.ALTER_AI_MODEL_ENDPOINT('my_model_endpoint1', '{
"parameters": "{\\\"min_concurrency\\\": 10, \\\"max_concurrency\\\": 80}"
}');
