渠道模型列表与测试端点,修复探测无配额误判
This commit is contained in:
@@ -458,6 +458,36 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ai-channels/{id}/models": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AI 管理"
|
||||
],
|
||||
"summary": "渠道模型缓存列表",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "渠道 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.itemsResponse-oci-portal_internal_model_AiModelCache"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ai-channels/{id}/probe": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -518,6 +548,51 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ai-channels/{id}/test-model": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AI 管理"
|
||||
],
|
||||
"summary": "测试渠道模型(max_tokens=16 试调;通过即设为探测验证模型并按需置渠道可用)",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "渠道 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "模型名",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.testChannelModelRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/oci-portal_internal_model.AiChannel"
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "试调未通过",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.errorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ai-content-logs": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -6732,6 +6807,17 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.testChannelModelRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"model"
|
||||
],
|
||||
"properties": {
|
||||
"model": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.tokenResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7921,6 +8007,10 @@ const docTemplate = `{
|
||||
"lastProbeAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"modelCount": {
|
||||
"description": "ModelCount 是渠道模型缓存计数,列表查询回填,不落库",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -7933,6 +8023,10 @@ const docTemplate = `{
|
||||
"probeError": {
|
||||
"type": "string"
|
||||
},
|
||||
"probeModel": {
|
||||
"description": "ProbeModel 是用户测试通过后固定的探测验证模型名;探测时置于候选首位",
|
||||
"type": "string"
|
||||
},
|
||||
"probeStatus": {
|
||||
"description": "ok / no_service / no_quota / error",
|
||||
"type": "string"
|
||||
|
||||
@@ -451,6 +451,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ai-channels/{id}/models": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AI 管理"
|
||||
],
|
||||
"summary": "渠道模型缓存列表",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "渠道 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.itemsResponse-oci-portal_internal_model_AiModelCache"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ai-channels/{id}/probe": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -511,6 +541,51 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ai-channels/{id}/test-model": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AI 管理"
|
||||
],
|
||||
"summary": "测试渠道模型(max_tokens=16 试调;通过即设为探测验证模型并按需置渠道可用)",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "渠道 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "模型名",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.testChannelModelRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/oci-portal_internal_model.AiChannel"
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "试调未通过",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.errorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ai-content-logs": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -6725,6 +6800,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.testChannelModelRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"model"
|
||||
],
|
||||
"properties": {
|
||||
"model": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.tokenResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7914,6 +8000,10 @@
|
||||
"lastProbeAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"modelCount": {
|
||||
"description": "ModelCount 是渠道模型缓存计数,列表查询回填,不落库",
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -7926,6 +8016,10 @@
|
||||
"probeError": {
|
||||
"type": "string"
|
||||
},
|
||||
"probeModel": {
|
||||
"description": "ProbeModel 是用户测试通过后固定的探测验证模型名;探测时置于候选首位",
|
||||
"type": "string"
|
||||
},
|
||||
"probeStatus": {
|
||||
"description": "ok / no_service / no_quota / error",
|
||||
"type": "string"
|
||||
|
||||
@@ -548,6 +548,13 @@ definitions:
|
||||
required:
|
||||
- regionKey
|
||||
type: object
|
||||
internal_api.testChannelModelRequest:
|
||||
properties:
|
||||
model:
|
||||
type: string
|
||||
required:
|
||||
- model
|
||||
type: object
|
||||
internal_api.tokenResponse:
|
||||
properties:
|
||||
expiresAt:
|
||||
@@ -1320,6 +1327,9 @@ definitions:
|
||||
type: integer
|
||||
lastProbeAt:
|
||||
type: string
|
||||
modelCount:
|
||||
description: ModelCount 是渠道模型缓存计数,列表查询回填,不落库
|
||||
type: integer
|
||||
name:
|
||||
type: string
|
||||
ociConfigId:
|
||||
@@ -1328,6 +1338,9 @@ definitions:
|
||||
type: integer
|
||||
probeError:
|
||||
type: string
|
||||
probeModel:
|
||||
description: ProbeModel 是用户测试通过后固定的探测验证模型名;探测时置于候选首位
|
||||
type: string
|
||||
probeStatus:
|
||||
description: ok / no_service / no_quota / error
|
||||
type: string
|
||||
@@ -2923,6 +2936,24 @@ paths:
|
||||
summary: 更新 AI 渠道
|
||||
tags:
|
||||
- AI 管理
|
||||
/api/v1/ai-channels/{id}/models:
|
||||
get:
|
||||
parameters:
|
||||
- description: 渠道 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.itemsResponse-oci-portal_internal_model_AiModelCache'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 渠道模型缓存列表
|
||||
tags:
|
||||
- AI 管理
|
||||
/api/v1/ai-channels/{id}/probe:
|
||||
post:
|
||||
parameters:
|
||||
@@ -2959,6 +2990,34 @@ paths:
|
||||
summary: 同步渠道模型缓存
|
||||
tags:
|
||||
- AI 管理
|
||||
/api/v1/ai-channels/{id}/test-model:
|
||||
post:
|
||||
parameters:
|
||||
- description: 渠道 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 模型名
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.testChannelModelRequest'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/oci-portal_internal_model.AiChannel'
|
||||
"502":
|
||||
description: 试调未通过
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.errorResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 测试渠道模型(max_tokens=16 试调;通过即设为探测验证模型并按需置渠道可用)
|
||||
tags:
|
||||
- AI 管理
|
||||
/api/v1/ai-content-logs:
|
||||
get:
|
||||
responses:
|
||||
|
||||
Reference in New Issue
Block a user