Commit graph

534 commits

Author SHA1 Message Date
何夕2077
f16f972d97
Merge pull request #320 from Asoubra12/pr/kiro-extended-thinking-slim
feat(kiro): add extended thinking passthrough and structured reasoning outputs
2026-02-20 19:27:04 +08:00
hex2077
42d1bd276f Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-20 19:18:24 +08:00
hex2077
71372495e0 feat(gemini): 添加 gemini-3.1-pro-preview 模型支持
在 provider-models.js 和 antigravity-core.js 中添加了新模型 gemini-3.1-pro-preview 的配置,使其可用于 gemini 和 gemini-antigravity 提供商。同时更新了模型别名映射,确保模型标识符能正确映射。
2026-02-20 19:18:15 +08:00
何夕2077
8ca2764252
Update VERSION 2026-02-18 22:19:33 +08:00
hex2077
fbc5357519 feat(claude): 添加 claude-sonnet-4-6 模型支持
更新模型列表和映射以支持新的 Claude Sonnet 4.6 模型。
2026-02-18 22:19:04 +08:00
何夕2077
dda058a144
Update VERSION 2026-02-15 11:22:19 +08:00
hex2077
43aaee61d7 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-15 11:21:32 +08:00
hex2077
55879396c8 feat(converters): 为请求添加 metadata 支持并优化会话缓存
- 在 CodexConverter 和 ClaudeConverter 中增加 metadata 字段,透传上游元数据
- 重构 CodexApiService 的缓存键生成逻辑,优先使用 session_id 或 conversation_id
- 从上游请求体中移除 metadata 避免透传,仅用于生成缓存键
2026-02-15 11:21:26 +08:00
何夕2077
75f61a033c
Update VERSION 2026-02-14 23:21:35 +08:00
hex2077
105bb39c1a fix(provider-pool-manager): 优化节点选择策略,防止序列号导致长期排挤
引入相对序列号机制,计算节点序列号相对于池中最小序列号的偏移量并封顶,避免全局自增序列号在长时间周期内对节点选择造成过度惩罚,确保公平性。同时修复重置节点时未清零序列号的问题。
2026-02-14 23:20:39 +08:00
何夕2077
a6778ce66d
Update VERSION 2026-02-14 20:49:52 +08:00
hex2077
7dfe057478 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-14 19:57:01 +08:00
hex2077
f27c9d8732 fix(providers): 统一错误日志格式并修复提供商模型引用
修复多个API服务中错误日志格式不一致的问题,统一使用error.message替代data字段
修正多个提供商模型引用方式,使用MODEL_PROVIDER常量替代硬编码字符串
更新Codex API请求头配置,修复流式响应处理逻辑
为iFlow API添加签名验证机制,增强请求安全性
添加GLM-5和MiniMax M2.5等新模型支持
修复400错误状态码检查逻辑,使用error.response?.status替代error.code
2026-02-14 19:54:53 +08:00
何夕2077
d1a9a5d858
Update VERSION 2026-02-13 20:49:12 +08:00
hex2077
6ee7e78c90 feat: 增强模型支持和修复流处理问题
- 添加新的Qwen模型(coder-model, vision-model)到提供者列表
- 修复OpenAI Responses流结束事件处理,避免下游类型校验错误
- 更新Qwen API端点地址和版本号
- 重构Codex转换器,分离OpenAI和OpenAI Responses的转换逻辑
- 优化工具调用处理,支持嵌套function结构
- 移除健康检查功能,简化API管理初始化
- 修复消息角色转换(developer→assistant)和类型标记
2026-02-13 20:47:47 +08:00
何夕2077
ce8e8ad855
Merge pull request #326 from ggdayup/feature/health-check-alerts
feat: add health check monitoring and alerting system
2026-02-13 15:01:08 +08:00
Local User
46fc601f6c feat: add health check monitoring and alerting system
- Add health status change logging with detailed information
- Add optional webhook notifications for provider health changes
  - Configurable via HEALTH_ALERT_WEBHOOK_URL environment variable
  - Sends notifications when provider becomes unhealthy or recovers
- Broadcast health status events for real-time UI updates
- Integrate periodic health checks in heartbeat function
- Track provider stats (usage count, error count) in health logs

This improves observability by allowing operators to:
- Monitor provider health status changes in real-time
- Receive alerts via webhook when issues occur
- View detailed health statistics for troubleshooting
2026-02-13 08:37:12 +08:00
Codex
9f3040cf49 feat(kiro): add request-side extended thinking support and structured reasoning outputs 2026-02-11 12:26:03 +03:00
何夕2077
54869893bf
Update VERSION 2026-02-11 11:21:16 +08:00
hex2077
82cab7a91f fix(openai): 更新代理配置的提供者标识符
将 getProxyConfigForProvider 调用中的提供者标识符从 'codex' 更改为 'openai-codex-oauth',以匹配最新的代理配置命名约定,确保代理设置能正确生效。
2026-02-11 11:18:43 +08:00
何夕2077
7d414cd5ac
Update VERSION 2026-02-09 22:00:56 +08:00
hex2077
a7b29d9d48 fix(provider-pool): 修正标记不健康提供者时的错误状态判断
将标记不健康提供者时的状态检查从 `status === 400` 改为 `error.code === 400`,确保正确识别客户端错误。同时在标记时传递错误信息给 `markProviderUnhealthy` 方法,以提供更详细的故障原因。
2026-02-09 21:58:45 +08:00
何夕2077
138bd122cd
Update VERSION 2026-02-09 20:05:02 +08:00
hex2077
7b13f157de Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-09 20:02:03 +08:00
hex2077
27acc72dfd feat: 增加登录过期配置并优化错误处理
- 新增 LOGIN_EXPIRY 配置项,支持自定义管理后台登录 Token 有效期
- 优化 provider 错误计数逻辑,当 MAX_ERROR_COUNT 为 0 时禁用自动标记不健康
- 修复工具消息转换中对象内容未序列化的问题
- 增强网络错误处理,可重试的网络错误不再导致进程退出
- 过滤 Claude Kiro provider 中描述为空的工具,避免 API 调用失败
2026-02-09 19:50:35 +08:00
何夕2077
f6cc66aad1
Update VERSION 2026-02-08 15:44:08 +08:00
hex2077
26d611dcf7 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-08 15:42:54 +08:00
hex2077
4d588f6c7d fix: 防止流式响应中重复发送结束标志并添加新模型支持
修复 handleStreamRequest 中可能重复发送流结束标志的问题,新增 hasMessageStop 状态跟踪。
在 provider-pool-manager 中修复临时配置缺少全局配置的问题。
为 Gemini 提供者添加新的模型支持:gemini-claude-opus-4-6-thinking。
2026-02-08 15:42:45 +08:00
何夕2077
68b6bce7c2
Update VERSION 2026-02-06 11:44:23 +08:00
hex2077
60b4296097 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-06 11:43:48 +08:00
hex2077
d0319047a1 feat: 添加对新模型 claude-opus-4-6 和 gpt-5.3-codex 的支持
- 在 Claude Kiro 提供商的模型映射表中新增 claude-opus-4-6
- 在提供商模型列表中为 claude-kiro-oauth 添加 claude-opus-4-6
- 在 OpenAI Codex 提供商中更新 API 版本至 0.98.0 并添加 gpt-5.3-codex 模型
2026-02-06 11:43:38 +08:00
何夕2077
f8c88c1a28
Update VERSION 2026-02-05 22:14:36 +08:00
hex2077
9ab39d0a9c fix: 将 iflow 配置中的 providerType 更正为 openai-iflow
原 providerType 'openai-iflow-oauth' 与后端定义不匹配,导致上传配置时提供商识别错误。统一使用 'openai-iflow' 以确保前后端一致。
2026-02-05 22:14:02 +08:00
何夕2077
cbab1c3b5e
Merge pull request #306 from majie776/main
fix(stream):修复流被客户端关闭的时候的写入错误导致服务crash的问题
2026-02-05 20:31:27 +08:00
何夕2077
440fffed31
Update VERSION 2026-02-05 17:54:07 +08:00
hex2077
347d36a1ce Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-05 17:52:49 +08:00
hex2077
57e2165fb8 feat: 支持批量关联配置文件并优化模型列表管理
- 修改批量关联功能,从逐个请求改为批量处理,提高效率
- 扩展快速链接API,支持同时处理多个配置文件
- 优化iFlow模型获取逻辑,支持手动添加多个模型
- 更新提供商模型列表,添加新模型并调整顺序
2026-02-05 17:52:22 +08:00
何夕2077
5cdd9830d8
Update VERSION 2026-02-05 15:29:46 +08:00
hex2077
81a3c44771 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-05 15:28:59 +08:00
hex2077
de3f6a5f21 feat: 添加监控请求ID临时存储功能到各AI服务提供商
在各AI服务提供商的核心API方法中添加monitorRequestId临时存储逻辑,用于跟踪请求链路。当请求体中包含_monitorRequestId字段时,将其存储到配置对象中并从请求体中删除,避免干扰API调用。

修改涉及以下提供商:
- Claude (claude-core.js, claude-kiro.js)
- OpenAI (openai-core.js, openai-responses-core.js, iflow-core.js, codex-core.js, qwen-core.js)
- Forward (forward-core.js)
- Gemini (gemini-core.js, antigravity-core.js)

统一处理模式:检查请求体中的_monitorRequestId字段,存储到this.config._monitorRequestId,然后从请求体中删除该字段。
2026-02-05 15:28:43 +08:00
majie776
2816de1451 fix(stream):修复流被客户端关闭的时候的写入错误导致服务crash的问题 2026-02-05 10:42:46 +08:00
何夕2077
d0583ba21f
Update VERSION 2026-02-04 18:58:32 +08:00
hex2077
2c758db714 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-02-04 18:36:28 +08:00
hex2077
ae10e9e365 feat(GeminiConverter): 支持从Gemini响应中提取tool_calls
在toOpenAIResponse方法中添加对Gemini响应中functionCall部分的解析,将其转换为OpenAI格式的tool_calls。当检测到工具调用时,自动设置finish_reason为"tool_calls",并构建包含tool_calls字段的assistant消息。
2026-02-04 18:36:15 +08:00
何夕2077
20e476219a
Merge pull request #303 from majie776/main
修复某些客户端没有接收到流结束信息后的错误
2026-02-04 16:40:12 +08:00
Jie Ma
6170666ff3 修复某些客户端没有接收到流结束信息后的错误 2026-02-04 13:42:28 +08:00
何夕2077
06121c9b10
Update VERSION 2026-02-03 21:54:46 +08:00
hex2077
ede63ac229 feat(gemini-oauth): 添加批量导入功能和文档更新
- 在 Gemini OAuth 模块中添加批量导入 Token 功能,支持流式进度反馈
- 为 Kiro OAuth 的批量导入功能优化自动关联逻辑,改为逐个凭据关联
- 在 Web UI 中添加 Gemini 批量导入的 API 端点
- 更新多语言文档,添加新的 FAQ 条目解决常见错误
- 扩展国际化翻译支持新的界面文本
2026-02-03 21:49:43 +08:00
hex2077
c632f184c6 feat(claude-kiro): 为空工具列表添加占位工具避免API错误
refactor(usage-api): 提取支持的提供商列表为共享常量
fix(usage-service): 移除重置时间的本地化格式化避免显示问题
style(usage-manager): 为不支持用量显示的提供商优化UI展示
chore: 更新README中的文档链接指向docs目录
2026-02-03 18:55:22 +08:00
何夕2077
97f6b99492
Update VERSION 2026-02-03 12:17:46 +08:00