Repository navigation
v1.0.3 - Usage Tracking Release
Introduces accurate token counting for usage tracking and improves compatibility.
✨ New Features
Added: Token counting with tiktoken for accurate usage tracking (#4)
- New
tokenizer.pymodule using OpenAI's tiktoken library (Rust-based, blazing fast) - Proper separation of
prompt_tokensandcompletion_tokensin API responses - Claude correction factor (1.15x) for more accurate token estimation
- Supports messages, tools, and multimodal content token counting
- Graceful fallback to character-based estimation if tiktoken unavailable
🐛 Bug Fixes
Fixed: Structured JSON error responses from Kiro API
- Error responses now return proper OpenAI-compatible JSON format instead of raw text
- Includes error message, type, and status code for better debugging
Fixed: Windows path compatibility for KIRO_CREDS_FILE
- Paths with backslashes (e.g.,
D:\Projects\file.json) no longer break due to escape sequence processing - Added raw .env file reading to preserve Windows paths as-is
Fixed: Cross-platform path normalization
KIRO_CREDS_FILEpaths are now normalized for Windows/Linux/macOS compatibility
⚡ Improvements
Changed: Reduced default FIRST_TOKEN_TIMEOUT from 30s to 15s
- Faster detection of stuck requests
- More responsive retry behavior
Changed: Centralized version constant
- Version is now defined in single place (
config.py) and imported elsewhere - Follows Single Source of Truth principle
⚙️ Configuration
Updated default values:
| Variable | Old Default | New Default |
|---|---|---|
FIRST_TOKEN_TIMEOUT |
30 |
15 |
📦 Dependencies
- Added
tiktokento requirements.txt for token counting
🔄 Upgrade
After downloading and extracting the new release, install new dependencies from the project folder:
pip install -r requirements.txtFull Changelog: v1.0.2...v1.0.3