mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-27 02:15:50 +03:00
[PR #223] [MERGED] Fix Kiro provider 500 error by enforcing per-tool description length limit #305
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#305
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/223
Author: @tickernelz
Created: 1/13/2026
Status: ✅ Merged
Merged: 1/13/2026
Merged by: @justlovemaki
Base:
main← Head:fix/kiro-tool-filtering📝 Commits (2)
f18ce00refactor(kiro): simplify tool size compression logicffb1cferefactor(kiro): remove schema simplification and size-based compression📊 Changes
1 file changed (+23 additions, -65 deletions)
View changed files
📝
src/providers/claude/claude-kiro.js(+23 -65)📄 Description
Problem
Claude provider returns 500 error when sending requests to Kiro API, while OpenCode provider works normally.
Root Cause
Kiro API has a hard limit of 10,240 characters per tool description. The issue was caused by individual tool descriptions exceeding this limit, not by the total number of tools or total payload size.
Analysis showed:
Solution
Implemented per-tool description truncation with a safe limit of 9,216 characters (90% of maximum):
Changes
Testing
Binary search testing confirmed the exact threshold:
Impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.