mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-26 09:55:54 +03:00
[PR #210] [MERGED] feat(kiro): extended thinking support dan fix token counting #303
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#303
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/210
Author: @tickernelz
Created: 1/11/2026
Status: ✅ Merged
Merged: 1/12/2026
Merged by: @justlovemaki
Base:
main← Head:feat/kiro-think-token-fix📝 Commits (3)
bdfb27dfeat(kiro): implement extended thinking support with streaming and token estimation6ff2a9bdocs(kiro): restore deleted comments10e4a48Merge remote-tracking branch 'aiclient/main' into feat/kiro-think-token-fix📊 Changes
1 file changed (+452 additions, -83 deletions)
View changed files
📝
src/providers/claude/claude-kiro.js(+452 -83)📄 Description
Summary
This PR implements extended thinking support for Claude's Kiro API adapter and significantly improves input token estimation accuracy for better context management in AI agent tools.
Key Features
1. Extended Thinking Support
2. Enhanced Token Estimation
3. Performance Characteristics
Testing
Extensively tested across multiple AI agent tools:
All tools demonstrate improved context management and accurate token estimation across various workload patterns including:
Technical Implementation
Thinking Support
KIRO_THINKINGconstants for tag managementbuildCodewhispererRequest()to inject thinking prefixes and handle thinking blocksgenerateContentStream()with proper state machine for real-time parsingbuildClaudeResponse()for non-streaming thinking supportToken Estimation
estimateInputTokens()to iterate through all content typesBreaking Changes
None. All changes are backward compatible.
Related Issues
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.