Commit graph

345 commits

Author SHA1 Message Date
何夕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
何夕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
accx
3d69d381de fix: 优化忽略 Antigravity 提示词
- 使用 ROUTING_PAYLOAD 标签包裹 Antigravity 提示词以实现上下文隔离,让 AI 彻底忽略 Antigravity 设定
- 确保 Antigravity 提示词不影响模型默认行为和身份认知,不把 Antigravity 作为默认身份设定和行为约束
- 提升与用户自定义角色/任务的兼容性,确保不干扰编程、分析、自定义角色等任务,同时仍可正常讨论或主动引用 Antigravity 相关内容
- 测试:向 sonnet4.5 发送 Hi/你是谁/你会什么 等消息,会是模型的内置系统提示词生效,不会扮演 Antigravity
2026-01-11 16:27:23 +08:00
何夕2077
a4038a84b3 Update VERSION 2026-01-10 23:11:51 +08:00
何夕2077
53dbe9381d Merge pull request #205 from Done-0/fix/kiro-tools-500-error
fix(kiro): 动态压缩 tools 解决 Claude Code 发送过多工具信息导致的 500 错误
2026-01-10 23:11:23 +08:00
Done-0
46ea3e707b fix(provider-pool): 优化错误计数逻辑,避免并发请求导致误判 unhealthy
问题:
  - 多个项目并发请求时,临时性 500 错误会快速累计
  - 即使内部重试成功,错误计数已经触发 unhealthy 标记

  解决方案:
  - 引入 10 秒滑动窗口机制
  - 超过窗口期的错误重置计数,而不是累加
  - 只有窗口期内连续失败才标记 unhealthy
2026-01-10 22:12:16 +08:00
Done-0
8b018b562e fix(kiro): 动态压缩 tools 解决 Claude Code 发送过多工具信息导致的 500 错误
问题:
  - Claude Code 发送过多工具信息,超出 Kiro API 请求限制导致 500 错误
  - 工具包括:内置工具、MCP 工具、Skills

  解决方案:
  - 先尝试原始大小,超过 20KB 才进行压缩
  - 第一步:简化 input_schema,只保留 type/enum/required
  - 第二步:按比例缩短 description(最短 50 字符)
  - 保留全部工具和 skills 可调用,不丢弃任何工具

  效果:
  - 80KB+ tools 压缩至 ~15KB
2026-01-10 21:15:08 +08:00
何夕2077
8dd275f231 Update VERSION 2026-01-10 18:56:02 +08:00
hex2077
a6d9eb1d6f fix: 修正Dockerfile中master.js路径错误
更新CMD指令中的文件路径,从src/master.js改为src/core/master.js,以匹配实际项目结构
2026-01-10 18:55:39 +08:00
何夕2077
af2dad239d Update VERSION 2026-01-10 18:50:59 +08:00
hex2077
f363c0c397 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-01-10 18:50:19 +08:00
hex2077
f801c8adb3 fix(update-api): 在解压前清理旧代码目录以确保完全更新
在performTarballUpdate函数中添加清理src/和static/目录的逻辑,防止旧代码残留影响更新完整性
2026-01-10 18:50:13 +08:00
何夕2077
3642afe9dd Update VERSION 2026-01-10 18:20:56 +08:00
hex2077
2d317e0333 refactor(项目结构): 重构项目目录结构并优化代码组织
将常用工具函数移动到utils目录
重构提供商策略模式实现
新增docker-compose构建配置文件
优化UI配置选择器的样式和交互
重构代理工具和API管理模块
更新脚本路径和依赖引用
2026-01-10 18:19:06 +08:00
hex2077
4554a4cfd2 feat(ui): 重构前端UI组件并添加新功能
- 新增组件加载器实现动态加载HTML组件
- 重构导航功能,添加滚动到顶部功能
- 新增多个UI组件:header、sidebar、logs、usage等
- 实现移动端菜单响应式设计
- 优化DOM元素获取方式,使用延迟加载
- 新增系统监控模块和用量缓存功能
- 扩展静态文件服务支持/components路径
- 实现插件管理和系统API接口
- 添加配置上传和管理功能
- 完善认证和token管理机制
2026-01-10 15:53:04 +08:00
何夕2077
bf11211a77 Update VERSION 2026-01-09 22:46:26 +08:00
何夕2077
290fce9e73 Merge pull request #199 from tickernelz/fix-400-kiro
fix(kiro): preserve tool definitions when history contains tool calls
2026-01-09 22:36:11 +08:00
何夕2077
0ad739aade Merge pull request #202 from leonaii/main
feat(api-potluck): 插件 - API 大锅饭 - 升级 V1.0.1
2026-01-09 22:35:16 +08:00
leonai
7f6bf6f06b feat(api-potluck): 插件 - API 大锅饭 - 升级 V1.0.1
1. 新增用户凭证数据管理模块(user-data-manager.js),支持凭证关联、资源包计算和配置热更新
2. 实现资源包机制:每个健康凭证提供额外调用次数,支持有效期管理和自动过期清理
3. 新增系统配置API:支持动态调整默认限额、资源包次数和有效期
4. 新增批量操作API:批量应用限额和同步资源包状态到所有Key
5. 实现凭证健康检查:从主服务ProviderPoolManager同步凭证状态
6. 新增用户端API Key重置功能,支持数据自动迁移
7. 重构前端界面:采用GitHub风格深色主题,优化移动端响应式布局
8. 新增定时健康检查调度器,自动同步所有用户凭证状态
2026-01-09 21:47:47 +08:00
Zhafron Kautsar
f9428fa294 Merge remote-tracking branch 'aiclient/main' into fix-400-kiro 2026-01-09 06:17:15 -05:00
何夕2077
bc4b0225e7 Update VERSION 2026-01-09 18:49:16 +08:00
hex2077
20992289b0 Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-01-09 18:48:43 +08:00
hex2077
e797b4742a feat(插件系统): 实现插件管理功能
添加完整的插件管理系统,包括以下功能:
1. 插件列表展示与状态统计
2. 插件启用/禁用功能
3. 自动扫描插件目录生成默认配置
4. 插件管理界面和样式
5. 相关API接口实现
6. 多语言支持
7. 移除不再需要的公共API路径配置
2026-01-09 18:47:11 +08:00
Zhafron Adani Kautsar
49382bf96b Merge branch 'justlovemaki:main' into fix-400-kiro 2026-01-09 05:32:07 -05:00
Zhafron Kautsar
5342214c5a fix(kiro): preserve tool definitions when history contains tool calls
When conversation history includes tool usage but current request doesn't
provide tool definitions, reconstruct minimal tool specifications from
history to prevent API errors. This ensures continuity in multi-turn
conversations with tool calling.

- Extract tool names from historical tool uses
- Generate placeholder tool specs with empty schemas
- Only apply when history has tool calls but toolsContext is empty
- Remove obsolete Chinese comment
2026-01-09 05:13:15 -05:00
何夕2077
c982ffe725 Update VERSION 2026-01-09 18:03:47 +08:00
hex2077
d639077bde feat(plugin): 实现可插拔插件系统架构
重构API大锅饭功能为插件,新增插件管理器核心模块
支持插件生命周期管理、认证中间件、路由和钩子扩展
添加默认认证插件和API大锅饭插件
2026-01-09 18:02:56 +08:00
何夕2077
148b7b2114 Update VERSION 2026-01-09 14:46:12 +08:00
何夕2077
f9a5377fda Merge pull request #198 from leonaii/main
refactor(kiro): 优化流式响应立即发送message_start,移除contextUsagePercentage等待逻辑
2026-01-09 14:45:18 +08:00
leonai
876b92cc0e refactor(kiro): 优化流式响应立即发送message_start,移除contextUsagePercentage等待逻辑
1. 立即发送message_start和content_block_start事件,不再等待contextUsagePercentage
2. 使用estimateInputTokens预估输入token作为保底值
3. 移除bufferedEvents缓冲机制和messageStartSent状态标记
4. 简化content事件处理逻辑,直接yield而非条件判断
5. 移除contextUsagePercentage未收到时的错误抛出逻辑
6. 更新estimateInputTokens方法注释,标记为备用方案而非废弃
2026-01-09 14:41:54 +08:00
何夕2077
32fdcd482a Update VERSION 2026-01-09 13:27:36 +08:00
何夕2077
f4c2a903aa Merge pull request #195 from leonaii/main
fix(kiro): 修复批量导入请求缺少认证头的问题,出现401错误,已经回归验证。
2026-01-09 13:27:19 +08:00