Different Claude models have different context window sizes: - Opus 4.5/4.6: 1M tokens - Sonnet 4.5/4.6: 200K tokens - Haiku 4.5: 200K tokens The current implementation uses a single hardcoded TOTAL_CONTEXT_TOKENS constant for all models, which causes input_tokens to be overestimated for small-context models or underestimated for large-context models. This change adds a MODEL_CONTEXT_TOKENS mapping and a helper function getContextTokensForModel() that selects the correct context window size based on the model being used, falling back to KIRO_CONSTANTS.TOTAL_CONTEXT_TOKENS for unknown models. |
||
|---|---|---|
| .. | ||
| claude-core.js | ||
| claude-kiro.js | ||
| claude-strategy.js | ||