mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-25 17:35:58 +03:00
[PR #180] [MERGED] refactor(claude-kiro): improve token counting accuracy using API contextUsagePercentage #286
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#286
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/180
Author: @tickernelz
Created: 1/8/2026
Status: ✅ Merged
Merged: 1/8/2026
Merged by: @justlovemaki
Base:
main← Head:fix-kiro-token-count📝 Commits (2)
e18303drefactor(claude-kiro): improve token counting accuracy using API contextUsagePercentage085b1efMerge branch 'main' into fix-kiro-token-count📊 Changes
1 file changed (+353 additions, -275 deletions)
View changed files
📝
src/claude/claude-kiro.js(+353 -275)📄 Description
Replace client-side token estimation with server-provided contextUsagePercentage for accurate input token calculation. This eliminates discrepancies between estimated and actual token counts by using the API's native context window measurement.
Key changes:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.