feat: context compression

This commit is contained in:
Alex
2025-11-23 18:35:51 +00:00
parent 9e58eb02b3
commit 3737beb2ba
28 changed files with 5393 additions and 93 deletions

View File

@@ -91,7 +91,7 @@ def test_clean_messages_google_basic():
{"function_call": {"name": "fn", "args": {"a": 1}}},
]},
]
cleaned = llm._clean_messages_google(msgs)
cleaned, system_instruction = llm._clean_messages_google(msgs)
assert all(hasattr(c, "role") and hasattr(c, "parts") for c in cleaned)
assert any(c.role == "model" for c in cleaned)