You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add context usage percentage to working memory endpoints
- Add context_usage_percentage field to WorkingMemoryResponse model
- Add _calculate_context_usage_percentage() helper function
- Update GET /v1/working-memory/{session_id} to return percentage
- Update PUT /v1/working-memory/{session_id} to return percentage based on final state (after potential summarization)
- Percentage calculated as (current_tokens / token_threshold) * 100 where token_threshold = context_window * 0.7
- Returns None when no model info provided, otherwise 0-100% value
Resolves#37
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Andrew Brookins <[email protected]>
0 commit comments