Updated on 2025-08-13 GMT+08:00

Modifying Model Configurations

Function

Modifying Model Configurations

URI

PUT /v1/{project_id}/applications/{application_id}/uni-search/models/{model_name}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints:

N/A

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

application_id

Yes

String

Definition:

Application ID. For details about how to obtain the application ID, see Obtaining an Application ID.

Constraints:

Character string

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

model_name

Yes

String

Definition:

Model name.

Constraints:

N/A

Value range:

The value can contain 1 to 64 characters. It can only contain letters, digits, underscores (_), periods (.), and hyphens (-).

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

detail

No

String

Definition:

Model description.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

type

No

String

Definition:

Model type.

Constraints:

N/A

Value range:

The value can be:

  • OCR

  • MLLM

  • LLM

  • PANGU_GUARD

  • PANGU_CHAT

  • PANGU_LLM

  • EMBEDDING

  • QUERY2QUERY

  • RERANK

  • SEARCH_PLAN

  • SEARCH_ENGINE

  • AI_ENGINE

  • MLLM

Default value:

N/A

endpoint

No

String

Definition:

Model endpoint.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

extend_config

No

ModelExtendConfig object

Definition:

User-defined model configuration, in JSON format.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

alias

No

String

Definition:

Model name required for the Ascend model scenario.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 4 ModelExtendConfig

Parameter

Mandatory

Type

Description

iam_info

Yes

IamInfo object

Definition:

IAM authentication agency information

Constraints:

N/A

Value range:

N/A

Default value:

N/A

custom_header

No

map<string, object>

Definition:

Extended request header.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

deployment_id

No

String

Definition:

Model deployment ID.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

vector_config

No

VectorConfig object

Definition:

Vector model configuration.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

nlp_config

No

NlpConfig object

Definition:

Configuration of the NLP foundation model.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

guard_enabled

No

Boolean

Definition:

Whether to enable moderation.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

query_key

No

String

Definition:

Key value of the query request body.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

custom_param

No

Map<String,String>

Definition:

Request parameter.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

custom_enabled

No

Boolean

Definition:

Custom field.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

custom_json_parse

No

Map<String,String>

Definition:

Result parsing.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

proxy_enabled

No

Boolean

Definition:

Whether to enable the proxy. This parameter is enabled when the web search engine is configured.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

time_detect_enabled

No

Boolean

Definition:

Whether to enable periodic detection. This parameter is enabled when the web search engine is configured.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

agree_disclaimer

No

String

Definition:

If the disclaimer has been agreed, AGREE is sent. By default, this parameter is left empty.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 5 IamInfo

Parameter

Mandatory

Type

Description

iam_enabled

No

Boolean

Definition:

Indicates whether to enable authentication.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

agency_enabled

No

Boolean

Definition:

Indicates whether to use an agency account for authentication

Constraints:

N/A

Value range:

N/A

Default value:

N/A

project_id

No

String

Definition:

Project ID of the IAM user. This parameter is mandatory when iam_enable is set to true.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

domain_name

No

String

Definition:

Name of the agency account.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

agency_name

No

String

Definition:

Agency name.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 6 VectorConfig

Parameter

Mandatory

Type

Description

embedding_url

Yes

String

Definition:

URL for calling the embedding or query2query model.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

rerank_url

No

String

Definition:

URL for calling the reranking model.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 7 NlpConfig

Parameter

Mandatory

Type

Description

context_length

Yes

Integer

Definition:

Context length, that is, the maximum number of tokens that can be considered by the NLP foundation model during a specific inference.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Added successfully.

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error Code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error Code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Example Requests

Modifying Model Configurations

/v1/111/applications/222/uni-search/models

{
  "detail" : "pangu_38b",
  "endpoint" : "http://10.0.0.169:31010",
  "extend_config" : {
    "deployment_id" : "123",
    "iam_info" : {
      "iam_enabled" : false,
      "agency_enabled" : false
    }
  }
}

Example Responses

None

Status Codes

Status Code

Description

200

Added successfully.

400

Incorrect request body.

500

Internal error.

Error Codes

See Error Codes.