Commit graph

10 commits

Author SHA1 Message Date
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
hex2077
02712afc30 feat(token): 增强token加载和保存的日志记录与验证
refactor(claude): 简化token计算逻辑并改进上下文使用率处理
2026-01-12 15:49: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
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
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
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
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
hex2077
2d317e0333 refactor(项目结构): 重构项目目录结构并优化代码组织
将常用工具函数移动到utils目录
重构提供商策略模式实现
新增docker-compose构建配置文件
优化UI配置选择器的样式和交互
重构代理工具和API管理模块
更新脚本路径和依赖引用
2026-01-10 18:19:06 +08:00