Commit graph

375 commits

Author SHA1 Message Date
hex2077
da72c2152d refactor(antigravity): 优化系统提示词处理逻辑并改进模型提供者检测
重构 antigravity-core.js 中的系统提示词处理方式,改为分段处理以提高可读性
修改 ollama-handler.js 中的模型提供者检测逻辑,使用模型列表匹配替代硬编码规则
2026-01-14 20:44:13 +08:00
何夕2077
cc30cb6f7a Merge pull request #234 from leonaii/main
feat(claude): 增强 Orchids 提示词模板的隐私保护和模型配置
2026-01-14 16:47:19 +08:00
Meo
1ec7ec3fcc Merge branch 'justlovemaki:main' into main 2026-01-14 16:11:10 +08:00
何夕2077
c763722bb4 Update VERSION 2026-01-14 16:09:30 +08:00
hex2077
5c90100997 feat(并发控制): 实现去重锁机制并优化提供者选择并发安全
为关键操作添加去重锁机制,确保并发请求只执行一次共享结果
重构 provider-pool-manager 使用链式锁保证选择操作的原子性
更新各服务提供者使用 withDeduplication 替代自定义单例锁
2026-01-14 16:01:04 +08:00
何夕2077
d1c8088a0c Merge pull request #233 from leonaii/main
fix(kiro): 增强 Kiro Provider 的认证恢复机制和并发处理能力
2026-01-14 14:36:50 +08:00
leonai
3b0fc590d5 fix(kiro): 添加token刷新单例锁并增强JSON解析容错
1. 引入tokenRefreshPromises Map实现按凭证文件路径的单例锁机制
2. 防止多个并发请求同时刷新同一个token导致的文件锁串行化问题
3. 添加repairJson函数处理损坏的JSON文件,增强解析容错能力
4. 重构token刷新逻辑,提取_doTokenRefresh和_reloadCredentialsAfterRefresh方法
2026-01-14 13:44:47 +08:00
leonai
3a04777439 Merge branch 'main' of https://github.com/leonaii/AIClient-2-API 2026-01-14 11:37:02 +08:00
Meo
6bfa3c5bfc Merge branch 'justlovemaki:main' into main 2026-01-14 11:36:29 +08:00
leonai
b14ae21917 fix(kiro): 增强401错误处理并支持Gemini格式请求体转换,修复健康KIRO健康检查错误。
1. 在callApi和callApiStream方法中添加contents到messages格式的自动转换
2. 401错误时先刷新UUID再刷新token,提高认证恢复成功率
3. 新增_refreshUuid方法用于生成新的UUID标识
4. ProviderPoolManager新增refreshProviderUuid方法支持UUID刷新
5. 移除Kiro OAuth的contents格式备用请求,统一使用messages格式
2026-01-14 11:31:28 +08:00
何夕2077
e6030ab7dc Update VERSION 2026-01-13 22:41:55 +08:00
hex2077
58c66fcd4b feat(文件锁): 添加文件锁机制防止凭证文件并发写入冲突
实现文件锁工具类,用于防止多个异步操作同时写入同一文件导致的竞争条件。修改各认证模块的凭证保存逻辑,在写入文件前获取锁,确保写入操作的原子性。

- 新增 file-lock.js 工具模块,提供 acquireFileLock 和 withFileLock 方法
- 修改所有认证模块的凭证保存逻辑,使用文件锁保护写入操作
- 添加适当的错误处理和锁释放机制,确保资源不会泄漏
2026-01-13 22:10:49 +08:00
hex2077
4a3bea4f7d docs: 在README中添加新的贡献者信息
添加了三位新的贡献者到中文、日文和英文的README文件中
2026-01-13 20:31:50 +08:00
leonai
a97f8b4b5a Merge branch 'main' of https://github.com/leonaii/AIClient-2-API 2026-01-13 19:56:10 +08:00
leonai
2e146a6fec fix(i18n): 添加 credentialSwitchMaxRetries 配置项的中英文翻译 2026-01-13 19:29:36 +08:00
何夕2077
bac1a1a0ad Update VERSION 2026-01-13 19:15:01 +08:00
hex2077
b1457457a2 feat(配置): 添加坏凭证切换最大重试次数配置项
在高级配置部分添加坏凭证切换最大重试次数的输入框及国际化文本
2026-01-13 19:14:37 +08:00
hex2077
d70352b26e Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-01-13 19:09:52 +08:00
hex2077
281d242466 feat(auth): 支持自定义 Builder ID Start URL 并添加相关国际化
为 Kiro OAuth 添加 Builder ID Start URL 的可配置选项,优先使用前端传入的值
添加相关国际化文本和 UI 控件,允许用户自定义或重新生成 Start URL
同时支持通过 options.authMethod 参数指定认证方法
2026-01-13 19:09:17 +08:00
何夕2077
17b847217c Merge pull request #229 from leonaii/main
feat(config): 添加坏凭证切换最大重试次数配置项,支持自定义配置,默认5。
2026-01-13 19:06:11 +08:00
leonai
bd8f03b68e feat(config): 添加凭证切换最大重试次数配置项
1. 新增 CREDENTIAL_SWITCH_MAX_RETRIES 配置项,默认值为 5
2. 在 config-manager.js 中添加配置初始化
3. 在 config-api.js 中支持配置的读取和更新
4. 在 common.js 中使用该配置控制凭证切换重试次数
5. 在前端配置页面添加对应的输入控件
2026-01-13 19:00:00 +08:00
何夕2077
ba88a1af21 Merge pull request #228 from leonaii/main
feat(kiro): 添加认证错误自动标记不健康及凭证切换重试机制,解决401 和403的问题
2026-01-13 18:55:49 +08:00
leonai
948283187c feat(kiro): 添加认证错误自动标记不健康及凭证切换重试机制,解决401 和403的问题
1. Kiro API 新增 401/403 错误处理逻辑,401 尝试刷新 token 后重试,403 直接标记凭证不健康
2. 新增 _markCredentialUnhealthy 辅助方法,统一处理凭证健康状态标记
3. ProviderPoolManager 新增 markProviderUnhealthyImmediately 方法,用于认证错误立即标记
4. handleStreamRequest/handleUnaryRequest 支持重试上下文,认证失败后自动切换健康凭证重试
5. provider-api 健康检查增加认证错误识别,触发立即标记不健康逻辑
2026-01-13 18:44:34 +08:00
hex2077
817c25267b feat(上传配置): 添加批量删除未关联配置文件功能并优化UI
refactor(提供商管理): 重构API路由顺序并添加健康节点管理功能
style(侧边栏): 更新配置管理为凭据文件管理以更准确描述功能
perf(提供商池): 优化健康检查仅检测不健康节点提升性能
fix(UI): 修复提供商编辑状态按钮显示问题
docs(i18n): 更新翻译文件以匹配新功能
2026-01-13 18:32:27 +08:00
何夕2077
b1c9be7724 Merge pull request #226 from leonaii/main
refactor(orchids): 重构 Orchids API 事件处理逻辑,添加原生工具调用支持
2026-01-13 17:51:33 +08:00
何夕2077
dd78d3821a Update VERSION 2026-01-13 13:29:30 +08:00
hex2077
e335a13592 fix: 修复多个功能问题并优化服务器配置
- 将Claude提供商的AXIOS超时恢复为2分钟
- 扩展CORS头以支持更多方法和头部,并添加预检缓存
- 禁用自动链接提供商配置
- 增强服务器配置,设置超时和最大连接数
- 为更新检查添加代理支持,使用undici进行代理请求
2026-01-13 13:29:03 +08:00
何夕2077
51992f30dc Merge pull request #221 from leonaii/main
feat(orchids): 集成 Orchids 平台作为新的 Claude 提供商
2026-01-13 13:25:08 +08:00
何夕2077
bb3a4ba862 Update VERSION 2026-01-13 12:18:11 +08:00
何夕2077
a7347cf64e Merge pull request #223 from tickernelz/fix/kiro-tool-filtering
Fix Kiro provider 500 error by enforcing per-tool description length limit
2026-01-13 12:14:28 +08:00
Zhafron Kautsar
debe3ec33d refactor(kiro): remove schema simplification and size-based compression
Eliminated the two-stage compression system that attempted to preserve original
tool schemas and only simplified when exceeding size limits. The provider now
applies consistent description truncation for all tools without conditional
schema processing or size calculations.

Removed:
- TARGET_TOTAL_SIZE constant and size checking logic
- simplifySchema helper function
- Conditional schema simplification based on total size

This change reduces complexity and ensures uniform handling of tool descriptions
regardless of total payload size.
2026-01-12 20:50:43 -05:00
Zhafron Kautsar
2e9e319933 refactor(kiro): simplify tool size compression logic
The code refactors the tool building process in initializeAuth to handle
description truncation and size limits more efficiently. It introduces
per-tool description truncation using a fixed max length, and simplifies
the compression logic by removing the iterative description adjustment
loop. This improves code clarity and performance.
2026-01-12 20:43:24 -05:00
leonai
d7cb0103b8 feat(orchids): 添加 Orchids OAuth 提供商集成
1. 新增 Orchids OAuth 提供商支持,包括凭据导入和 API 服务
2. 添加 claude-orchids.js 核心服务实现 WebSocket 通信
3. 实现 JWT Token 解析和凭据管理功能
4. 更新 UI 界面支持 Orchids Token 导入和配置管理
5. 添加 i18n 多语言支持(中文/英文)
6. 更新 .gitignore 忽略 Orchids 凭据文件
2026-01-12 20:00:27 +08:00
何夕2077
2e9c24d1f0 Update VERSION 2026-01-12 16:06:07 +08:00
hex2077
02712afc30 feat(token): 增强token加载和保存的日志记录与验证
refactor(claude): 简化token计算逻辑并改进上下文使用率处理
2026-01-12 15:49:19 +08:00
何夕2077
d1516abc4e Merge pull request #216 from lixiangwuxian/main
fix: 修改oauth鉴权逻辑,支持调用回调认证url过程中使用代理
2026-01-12 15:40:35 +08:00
何夕2077
86014b217b Merge pull request #210 from tickernelz/feat/kiro-think-token-fix
feat(kiro): extended thinking support dan fix token counting
2026-01-12 12:53:19 +08:00
Zhafron Kautsar
6d8afe5c33 Merge remote-tracking branch 'aiclient/main' into feat/kiro-think-token-fix 2026-01-11 11:07:52 -05:00
何夕2077
3676c5330b Update VERSION 2026-01-11 23:54:50 +08:00
hex2077
1d01feee35 fix: 调整Claude模型的总上下文tokens限制为172500
更新TOTAL_CONTEXT_TOKENS常量以匹配最新的API限制,从160k提升至173k tokens
2026-01-11 23:54:26 +08:00
Zhafron Kautsar
89083499bc docs(kiro): restore deleted comments 2026-01-11 10:52:26 -05:00
何夕2077
8c28b027d2 Update VERSION 2026-01-11 23:21:06 +08:00
hex2077
c2152669d3 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-01-11 23:20:41 +08:00
何夕2077
aac340dcb0 Update VERSION 2026-01-11 23:08:10 +08:00
hex2077
340d6f9e10 fix(claude-kiro): 修复工具调用token计算和web搜索工具过滤问题
- 过滤web_search/websearch工具调用
- 将工具调用的name和input内容计入totalContent用于token计算
- 调整总上下文token限制为160k
- 禁用provider_pools.json.example中所有provider的健康检查
- 更新api-potluck插件描述添加管理端和用户端链接
2026-01-11 23:07:02 +08:00
lixiangwuxian
035118ea6f fix: 修改oauth鉴权逻辑,支持调用回调url过程中使用代理 2026-01-11 21:15:23 +08:00
何夕2077
ff3be72c49 Update VERSION 2026-01-11 19:45:19 +08:00
hex2077
37282b6fab fix(update): 使用gh-proxy代理GitHub API和下载链接
修改GitHub API和tarball下载链接,通过gh-proxy.org代理访问,解决国内可能存在的网络访问问题
2026-01-11 19:43:22 +08:00
何夕2077
cecd7c08f5 Merge pull request #209 from kj1534/main
fix: 优化忽略 Antigravity 提示词
2026-01-11 19:29:40 +08:00
Zhafron Kautsar
d26b4ee162 feat(kiro): implement extended thinking support with streaming and token estimation
Add comprehensive support for Claude's extended thinking feature in Kiro provider:
- Add thinking block parsing and streaming with proper tag detection
- Implement thinking prefix injection in system prompts with budget validation
- Add bidirectional conversion between Kiro text format and Claude content blocks
- Enhance token estimation with detailed breakdown for thinking, tools, and content types
- Fix streaming to properly handle thinking blocks with start/stop events
- Improve context usage percentage handling and input token calculation
- Add helper functions for quote-aware tag detection to avoid false positives
2026-01-11 05:06:01 -05:00