Update model configuration¶
Partially update the agent model configuration. Each successful update increments the configuration version.
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/model-configs/{model_config_id}
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First Query model configuration details to confirm the current fields and versions. Prepare a personal access token and target workspace ID that can access the target workspace.
Request body¶
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/model-configs/$MODEL_CONFIG_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"capabilities": ["tool_calling"],
"parameters": {
"temperature": 0.2
}
}'
Keep the original value when omitting a field or filling in null. Clear it when {} is filled in the object field and [] is filled in the capability list. Restores the default value created when an enumeration field is filled with a blank string.
Even if the request body is {}, the version will be incremented. This interface does not check whether the old version has changed, and the read version number cannot be used to prevent concurrent overwriting.
Path parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Current workspace ID. |
|
string |
Yes |
Model configuration ID. |
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string or null |
No |
Configure name, description, and display name. |
|
string or null |
No |
Configure name, description, and display name. |
|
string or null |
No |
Configuration status, source type, and model category. |
|
string or null |
No |
Configuration status, source type, and model category. |
|
string or null |
No |
Configuration status, source type, and model category. |
|
string or null |
No |
Provider reference and model name. |
|
string or null |
No |
Provider reference and model name. |
|
string or null |
No |
Configure name, description, and display name. |
|
string or null |
No |
Connection and credential references. |
|
string or null |
No |
Connection and credential references. |
|
object or null |
No |
model parameters. Objects allow extended keys. |
|
object or null |
No |
Model parameter definition. Objects allow extended keys. |
|
array of string or null |
No |
List of model capabilities. |
|
object or null |
No |
Usage Restrictions. Objects allow extended keys. |
|
string or null |
No |
Billing information reference. |
|
object or null |
No |
String key-value label. A single value allows a string or null. The root value rules are explained after the table. |
|
object or null |
No |
String key value annotation. A single value allows a string or null. The root value rules are explained after the table. |
|
object or null |
No |
Other metadata. Objects allow extended keys. |
Successful response¶
{
"code": 0,
"data": {
"id": "mc_01",
"workspace_id": "ws_01",
"name": "销售分析模型",
"status": "active",
"source_kind": "workspace",
"model_category": "chat",
"model_name": "<MODEL_NAME>",
"capabilities": [
"tool_calling"
],
"version": 2,
"updated_at": "2026-08-18T02:00:00Z",
"created_at": "2026-10-14T00:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
success code. |
|
object |
The data returned by this operation. |
|
string |
Model configuration ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
Updated configuration name. |
|
string |
Description of the current object. |
|
string |
Updated status, source type and model category. The values are |
|
string |
Updated status, source type and model category. The values are |
|
string |
Updated status, source type and model category. The values are |
|
string |
Resource references. |
|
string |
Updated model name. |
|
string |
Display name. |
|
string |
Connection configuration reference. |
|
string |
Credentials reference. |
|
object |
Model parameter objects allow extended keys. |
|
object |
The model parameter definition object allows extended keys. |
|
array of string |
Capability description. |
|
object |
Using restricted objects allows extended keys. |
|
string |
Pricing Quote. |
|
integer |
Updated configuration version. |
|
object |
Tag key-value pairs objects allow extended keys. |
|
object |
Annotated key-value objects allow extended keys. |
|
object |
Extended metadata objects allow extended keys. |
|
string |
Creator ID. |
|
string |
Identifier of the last updated person. |
|
string |
Creation time. In RFC 3339 format. |
|
string |
Update time. In RFC 3339 format. |
Error response¶
{
"code": 2,
"message": "模型配置参数无效"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
400 |
|
Invalid request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
401 |
|
Missing or invalid authentication credentials. |
Check the credential type, expiration, and authentication header. |
403 |
|
The current identity or active role does not have permission for this operation. |
Use an authorized identity or contact an administrator to grant access. |
404 |
|
The target object or required reference was not found. |
Verify the object identifier, workspace, and current status. |
409 |
|
Conflict in resource state, request payload, or concurrent modification. |
Re-read the current state and version, then handle according to the latest result. |
503 |
|
A business, runtime, or authorization dependency is temporarily unavailable. |
After the dependency recovers, check existing results first instead of blindly repeating writes. |