Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 131 additions & 8 deletions backend/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2672,6 +2672,76 @@ const docTemplate = `{
}
}
},
"/admin/llm/models/{id}/protocols": {
"patch": {
"security": [
{
"BearerAuth": []
}
],
"description": "在单个数据库事务中更新平台模型能力类型,并将该模型全部上游绑定替换为指定的完整协议集合",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"llm"
],
"summary": "管理员替换模型全部来源的协议集合",
"parameters": [
{
"type": "integer",
"description": "模型ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "完整协议集合与模型能力类型",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SetModelProtocolsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SetModelProtocolsResponseDoc"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ChannelErrorDoc"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/ChannelErrorDoc"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/ChannelErrorDoc"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ChannelErrorDoc"
}
}
}
}
},
"/admin/llm/models/{id}/sources": {
"get": {
"security": [
Expand Down Expand Up @@ -21348,6 +21418,44 @@ const docTemplate = `{
}
}
},
"SetModelProtocolsRequest": {
"type": "object",
"required": [
"kindsJSON",
"protocols"
],
"properties": {
"kindsJSON": {
"type": "string",
"maxLength": 1000,
"minLength": 2
},
"protocols": {
"type": "array",
"maxItems": 2,
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
},
"SetModelProtocolsResponseDoc": {
"type": "object",
"required": [
"data",
"errorMsg"
],
"properties": {
"data": {
"$ref": "#/definitions/ModelDataResponse"
},
"errorMsg": {
"type": "string"
}
}
},
"SetModelsDisplayGroupRequest": {
"type": "object",
"required": [
Expand Down Expand Up @@ -22825,17 +22933,21 @@ const docTemplate = `{
"type": "object",
"required": [
"platformModelName",
"protocols",
"upstreamModelName"
],
"properties": {
"cbDurationMin": {
"type": "integer"
"type": "integer",
"minimum": 0
},
"cbFailureThreshold": {
"type": "integer"
"type": "integer",
"minimum": 0
},
"cbWindowMin": {
"type": "integer"
"type": "integer",
"minimum": 0
},
"headersJSON": {
"type": "string",
Expand All @@ -22853,18 +22965,29 @@ const docTemplate = `{
"priority": {
"type": "integer"
},
"protocol": {
"type": "string",
"maxLength": 64
"protocols": {
"description": "Protocols 为空数组时根据模型能力和上游默认配置自动推断完整协议集合。",
"type": "array",
"maxItems": 2,
"uniqueItems": true,
"items": {
"type": "string"
}
},
"routeID": {
"type": "integer"
"routeIDs": {
"type": "array",
"maxItems": 2,
"uniqueItems": true,
"items": {
"type": "integer"
}
},
"source": {
"type": "string",
"maxLength": 64
},
"status": {
"description": "路由配置字段省略时保留已有协议各自的配置;新增协议使用服务端默认值或现有绑定模板。",
"type": "string",
"enum": [
"active",
Expand Down
139 changes: 131 additions & 8 deletions backend/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2665,6 +2665,76 @@
}
}
},
"/admin/llm/models/{id}/protocols": {
"patch": {
"security": [
{
"BearerAuth": []
}
],
"description": "在单个数据库事务中更新平台模型能力类型,并将该模型全部上游绑定替换为指定的完整协议集合",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"llm"
],
"summary": "管理员替换模型全部来源的协议集合",
"parameters": [
{
"type": "integer",
"description": "模型ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "完整协议集合与模型能力类型",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SetModelProtocolsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SetModelProtocolsResponseDoc"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/ChannelErrorDoc"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/ChannelErrorDoc"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/ChannelErrorDoc"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/ChannelErrorDoc"
}
}
}
}
},
"/admin/llm/models/{id}/sources": {
"get": {
"security": [
Expand Down Expand Up @@ -21341,6 +21411,44 @@
}
}
},
"SetModelProtocolsRequest": {
"type": "object",
"required": [
"kindsJSON",
"protocols"
],
"properties": {
"kindsJSON": {
"type": "string",
"maxLength": 1000,
"minLength": 2
},
"protocols": {
"type": "array",
"maxItems": 2,
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
},
"SetModelProtocolsResponseDoc": {
"type": "object",
"required": [
"data",
"errorMsg"
],
"properties": {
"data": {
"$ref": "#/definitions/ModelDataResponse"
},
"errorMsg": {
"type": "string"
}
}
},
"SetModelsDisplayGroupRequest": {
"type": "object",
"required": [
Expand Down Expand Up @@ -22818,17 +22926,21 @@
"type": "object",
"required": [
"platformModelName",
"protocols",
"upstreamModelName"
],
"properties": {
"cbDurationMin": {
"type": "integer"
"type": "integer",
"minimum": 0
},
"cbFailureThreshold": {
"type": "integer"
"type": "integer",
"minimum": 0
},
"cbWindowMin": {
"type": "integer"
"type": "integer",
"minimum": 0
},
"headersJSON": {
"type": "string",
Expand All @@ -22846,18 +22958,29 @@
"priority": {
"type": "integer"
},
"protocol": {
"type": "string",
"maxLength": 64
"protocols": {
"description": "Protocols 为空数组时根据模型能力和上游默认配置自动推断完整协议集合。",
"type": "array",
"maxItems": 2,
"uniqueItems": true,
"items": {
"type": "string"
}
},
"routeID": {
"type": "integer"
"routeIDs": {
"type": "array",
"maxItems": 2,
"uniqueItems": true,
"items": {
"type": "integer"
}
},
"source": {
"type": "string",
"maxLength": 64
},
"status": {
"description": "路由配置字段省略时保留已有协议各自的配置;新增协议使用服务端默认值或现有绑定模板。",
"type": "string",
"enum": [
"active",
Expand Down
Loading
Loading