refactor: 增强跨格式转换系统,支持 thinking/文件/音频/响应格式等完整转换

- 新增 ThinkingConfig/ResponseFormatConfig/FileBlock/AudioBlock 内部表示
- 实现 OpenAI reasoning_effort <-> Claude thinking <-> Gemini thinkingConfig 互转
- 支持 OpenAI web_search_options -> Claude web_search tool 转换
- 新增异步 convert_request_async,在转换阶段解析图片 URL 为 base64
- 将 GlobalModel.output_limit 传播至跨格式转换用于 max_tokens 默认值
- 前端模型表单增加最大输出 Token 和上下文窗口配置
- Claude normalizer 保留 cache_control 透传(system 数组和 content block)
- Gemini normalizer 支持内置工具(googleSearch/codeExecution/urlContext)
- OpenAI normalizer 补全采样参数、response_format、usage details 转换
- 各 normalizer 工具方法提取至基类消除重复代码
- 简化 Kiro model mapping 为直接透传
- 预置模型列表添加 claude-sonnet-4.6
This commit is contained in:
fawney19
2026-02-19 10:40:49 +08:00
parent 11f2ddbba2
commit 0d2cafaec3
20 changed files with 1405 additions and 234 deletions

4
.gitignore vendored
View File

@@ -1,9 +1,6 @@
# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python
CLIProxyAPI/
sub2api/
# AI Assistant Configuration
.claude/
.serena/
@@ -235,4 +232,5 @@ src/_version.py
# Analysis folder (third-party code for reference)
analysis/
new-api/
/aether-proxy/target/