refactor: 统一测试请求构建逻辑,支持多格式测试

- 重构 adapter 基类的 build_request_body 方法,使用 converter_registry 自动处理格式转换
- 后端 test_model 接口增加 endpoint_id 和 api_format 参数支持
- 前端模型映射测试支持根据 Key 和端点配置动态显示可用格式下拉菜单
This commit is contained in:
fawney19
2026-01-22 23:25:51 +08:00
parent 6c7b40764f
commit 1da70d0518
12 changed files with 264 additions and 85 deletions

View File

@@ -1,6 +1,9 @@
import client from '../client'
import type { EndpointAPIKey, AllowedModels } from './types'
// Re-export types for convenience
export type { EndpointAPIKey, AllowedModels }
/**
* 能力定义类型
*/

View File

@@ -68,6 +68,7 @@ export interface TestModelRequest {
provider_id: string
model_name: string
api_key_id?: string
endpoint_id?: string
message?: string
api_format?: string
}