refactor: update context compression configuration to use config.yaml and improve model handling

This commit is contained in:
teknium1
2026-02-28 04:46:35 -08:00
parent 0afe1b707d
commit 6366177118
4 changed files with 19 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ class ContextCompressor:
protect_last_n: int = 4,
summary_target_tokens: int = 500,
quiet_mode: bool = False,
summary_model_override: str = None,
):
self.model = model
self.threshold_percent = threshold_percent
@@ -49,7 +50,8 @@ class ContextCompressor:
self.last_completion_tokens = 0
self.last_total_tokens = 0
self.client, self.summary_model = get_text_auxiliary_client()
self.client, default_model = get_text_auxiliary_client()
self.summary_model = summary_model_override or default_model
def update_from_response(self, usage: Dict[str, Any]):
"""Update tracked token usage from API response."""