渠道模型列表弹窗与模型数量列
CI / test (push) Successful in 28s
Release / release (push) Successful in 26s

This commit is contained in:
2026-07-14 19:33:55 +08:00
parent 08fa529348
commit 78cc2aab56
6 changed files with 246 additions and 11 deletions
+9
View File
@@ -83,6 +83,15 @@ export function syncAiChannelModels(id: number): Promise<AiModelCacheItem[]> {
}).then((r) => r.items)
}
export function listAiChannelModels(id: number): Promise<AiModelCacheItem[]> {
return request<{ items: AiModelCacheItem[] }>(`/ai-channels/${id}/models`).then((r) => r.items)
}
/** 单模型 max_tokens=16 试调;通过即设为该渠道探测验证模型并按需置渠道可用 */
export function testAiChannelModel(id: number, model: string): Promise<AiChannel> {
return request(`/ai-channels/${id}/test-model`, { method: 'POST', body: { model } })
}
// ---- 聚合模型与调用日志 ----
export function listAiModels(): Promise<AiModel[]> {