diff --git a/CHANGELOG.md b/CHANGELOG.md index 1829edc..ab3d790 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ 格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/)(版本段不记日期),版本号遵循语义化版本。 +## [0.5.0] + +### Added + +- AI 网关「接入信息」新增 `POST /tts` 端点展示(文本转语音 · xAI 官方格式) +- AI 网关「可用模型」新增「过滤弃用」开关:开启后已宣布弃用(即使未退役)的模型从模型列表与路由中排除,状态持久化,切换即时刷新列表 + ## [0.4.0] ### Added diff --git a/src/api/aigateway.ts b/src/api/aigateway.ts index 845a0e7..4d637c2 100644 --- a/src/api/aigateway.ts +++ b/src/api/aigateway.ts @@ -7,6 +7,7 @@ import type { AiModel, AiModelBlacklistItem, AiModelCacheItem, + AiSettings, } from '@/types/api' // ---- 网关密钥 ---- @@ -88,6 +89,16 @@ export function listAiModels(): Promise { return request<{ items: AiModel[] }>('/ai-models').then((r) => r.items) } +// ---- 网关全局设置 ---- + +export function getAiSettings(): Promise { + return request('/ai-settings') +} + +export function updateAiSettings(body: AiSettings): Promise { + return request('/ai-settings', { method: 'PUT', body }) +} + // ---- 模型黑名单 ---- export function listAiBlacklist(): Promise { diff --git a/src/types/api.ts b/src/types/api.ts index 2101a2e..29b1f6e 100644 --- a/src/types/api.ts +++ b/src/types/api.ts @@ -968,6 +968,11 @@ export interface AiModelCacheItem { } /** 模型黑名单条目:拉黑即全渠道剔除,同步 / 探测不再入库 */ +/** AI 网关全局设置 */ +export interface AiSettings { + filterDeprecated: boolean +} + export interface AiModelBlacklistItem { id: number name: string diff --git a/src/views/AiGatewayView.vue b/src/views/AiGatewayView.vue index c24ab5c..882312c 100644 --- a/src/views/AiGatewayView.vue +++ b/src/views/AiGatewayView.vue @@ -1,14 +1,16 @@