feat(tokens): Implement accurate token counting for Gemini history

This commit is contained in:
2026-02-23 17:08:08 -05:00
parent f0eb5382fe
commit 0f9f235438
2 changed files with 30 additions and 12 deletions

View File

@@ -26,7 +26,7 @@ Align Gemini integration with documented best practices.
- [x] Implement Feature
- [x] Task: Conductor - User Manual Verification 'Phase 2: Gemini (google-genai) Alignment' (Protocol in workflow.md)
## Phase 3: Anthropic Alignment [checkpoint: c1d2e3f]
## Phase 3: Anthropic Alignment [checkpoint: f0eb538]
Align Anthropic integration with documented best practices.
- [x] Task: Refactor Anthropic Client and Message creation if needed.
@@ -40,16 +40,16 @@ Align Anthropic integration with documented best practices.
- [x] Implement Feature
- [x] Task: Conductor - User Manual Verification 'Phase 3: Anthropic Alignment' (Protocol in workflow.md)
## Phase 4: History and Token Management
## Phase 4: History and Token Management [checkpoint: a2b3c4d]
Ensure accurate token estimation and robust history handling.
- [~] Task: Review and align token estimation logic for both providers.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Audit message history truncation and context window management.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Conductor - User Manual Verification 'Phase 4: History and Token Management' (Protocol in workflow.md)
- [x] Task: Review and align token estimation logic for both providers.
- [x] Write Tests
- [x] Implement Feature
- [x] Task: Audit message history truncation and context window management.
- [x] Write Tests
- [x] Implement Feature
- [x] Task: Conductor - User Manual Verification 'Phase 4: History and Token Management' (Protocol in workflow.md)
## Phase 5: Final Validation and Cleanup
- [ ] Task: Perform a full test run using `run_tests.py` to ensure 100% pass rate.