AIClient-2-API/src/providers/claude
yin1245 88523e099c fix: use per-model context window size for accurate input_tokens estimation
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.
2026-03-29 12:31:46 +08:00
..
claude-core.js feat: 增强TLS sidecar支持并更新模型列表 2026-03-16 18:26:16 +08:00
claude-kiro.js fix: use per-model context window size for accurate input_tokens estimation 2026-03-29 12:31:46 +08:00
claude-strategy.js feat(logging): 添加日志系统配置和下载功能 2026-01-25 17:24:39 +08:00