fix: use actual token usage from Kiro API instead of hardcoded 0
- Added usage tracking to AwsEventStreamParser - Parser now stores usage_credits and context_usage_percentage - Added get_usage() method to retrieve usage data - Updated handler to pass usage data to response builder - Non-streaming: Uses actual usage_credits as total_tokens - Streaming: Includes usage_credits in final chunk - Falls back to 0 if Kiro API doesn't provide usage data - Prevents over-estimation when Kiro returns 0 tokens
Showing
Please
register
or
sign in
to comment