Explicit allowlisted structured fields only; omitted fields and unknown native settings are retained. Native read-merge-write is not CAS and provides no cross-instance atomic protection. Sensitive and plugin fields require their corresponding caller permissions and PAT scopes. Native HTTP 200 success=false or a failed readback can mean partial or uncertain writes (409 channel_result_unknown); reread and inspect manually, do not automatically retry.
/oneaster/v1/admin/channels/{id}/config身份验证
Authorizationstring必填使用登录取得的 native access_token(部分接口支持带对应权限的 PAT);身份要求:管理员。
Authorization: Bearer $ONEASTER_ACCESS_TOKEN
参数
idinteger必填path
请求正文 · application/json
channelobjectCreation requires type/name/key/models/group. Credentials are write-only. Structured configuration is separate; status uses its dedicated route.
settingobjectsettingsobjectheadersobjectWrite-only changes restricted to accept, content-type, user-agent, x-request-id, x-client-version, anthropic-version, anthropic-beta, openai-beta. Other headers are retained.
paramsobjectWrite-only flat primitive values; unknown and complex existing overrides are retained.
JSON Schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"channel": {
"type": "object",
"description": "Creation requires type/name/key/models/group. Credentials are write-only. Structured configuration is separate; status uses its dedicated route.",
"properties": {
"name": {
"type": "string",
"writeOnly": false
},
"key": {
"type": "string",
"writeOnly": true
},
"models": {
"type": "string",
"writeOnly": false
},
"group": {
"type": "string",
"writeOnly": false
},
"base_url": {
"type": [
"string",
"null"
],
"writeOnly": true
},
"tag": {
"type": "string",
"writeOnly": false
},
"remark": {
"type": "string",
"writeOnly": false
},
"test_model": {
"type": "string",
"writeOnly": false
},
"type": {
"type": "integer"
},
"weight": {
"type": "integer"
},
"priority": {
"type": "integer"
},
"auto_ban": {
"type": "integer"
},
"model_mapping": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"status_code_mapping": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"openai_organization": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"setting": {
"type": "object",
"additionalProperties": false,
"properties": {
"pass_through_body_enabled": {
"type": "boolean"
},
"responses_websocket_enabled": {
"type": "boolean"
},
"task_plugin_key": {
"type": "string"
},
"task_extend_plugin_keys": {
"type": "array",
"maxItems": 512,
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
},
"settings": {
"type": "object",
"additionalProperties": false,
"properties": {
"upstream_model_update_check_enabled": {
"type": "boolean"
},
"upstream_model_update_auto_sync_enabled": {
"type": "boolean"
}
}
},
"headers": {
"type": "object",
"additionalProperties": false,
"required": [
"set",
"remove"
],
"properties": {
"set": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"remove": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"uniqueItems": true
}
},
"description": "Write-only changes restricted to accept, content-type, user-agent, x-request-id, x-client-version, anthropic-version, anthropic-beta, openai-beta. Other headers are retained."
},
"params": {
"type": "object",
"additionalProperties": false,
"required": [
"set",
"remove"
],
"properties": {
"set": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"remove": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 64,
"uniqueItems": true
}
},
"description": "Write-only flat primitive values; unknown and complex existing overrides are retained."
}
}
}