Update an LLM backend (root endpoint)¶
Change a specified LLM backend’s name, declared models, and supported configuration fields.
PUT https://api.moi.matrixorigin.cn/v5/llm/backends/{backend_id}
Before you call this API¶
BASE_URL uses the product API prefix https://api.moi.matrixorigin.cn/v5. For a dedicated deployment, use its corresponding product API address.
Configure identity, Workspace, and object permissions in the same environment.
Request¶
curl --request PUT \
"$BASE_URL/llm/backends/$BACKEND_ID" \
--header "X-API-Key: $MOI_KEY" \
--header "X-Workspace-ID: $WORKSPACE_ID" \
--header "Content-Type: application/json" \
--data-raw '{"name":"更新后"}'
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Header |
string |
Yes |
Workspace ID in the same environment. |
|
Path |
integer |
Yes |
Positive ID returned by an earlier read. |
|
Body |
string |
No |
Omission/null/empty/whitespace-only values preserve the previous name. |
|
Body |
string |
No |
Nonempty values replace; omission/null/empty preserves. Empty values cannot clear credentials. |
|
Body |
integer |
No |
Positive values update; omission/null/nonpositive values preserve. |
|
Body |
array (strings) or null |
No |
Only a nonempty array replaces the value. Omission, null, and [] all retain it. |
|
Body |
string |
No |
Only updated for nonempty LLM values; empty values retain it. |
Requires object model_backend.update. Type is absent from the update structure. No business request_id/CAS protection is supported. Reread required fields after writing. Extra keys accepted during binding but not used do not establish an update.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"id": 12,
"name": "更新后",
"type": "OPENAI",
"timeout_seconds": 120,
"models": [
"chat-example"
],
"created_at": 1794445200,
"updated_at": 1794445200,
"reasoning_control_protocol": "REASONING_CONTROL_NONE"
}
}
HTTP 200。
Field |
Type |
Description |
|---|---|---|
|
string |
OK on success. |
|
string |
OK on success. |
|
object |
Error response¶
Errors and result confirmation distinguishes the two protocols. Parse omitted fields, SDK zero values, and empty HTTP responses separately. Confirm writes using the corresponding read operation.