fix(anthropic): support automatic compaction (Opus 4.6)
by ccurme
·
Feb 06, 2026 at 19:29 UTC
·
scan-4d01c0e4f96a5473
Get this automatically on every PR
Install the Axiomo GitHub App to get Signals as check runs and PR comments on every pull request.
Risk level: Medium (40%)
Support automatic compaction and add inference_geo parameter for Anthropic models
Documentation and changes in `chat_models.py` for adaptive type
Clarification added in `chat_models.py`
Test `test_inference_geo_in_payload` in `test_chat_models.py`
Trusted contributor with 1100 merged PRs. has 207 followers. unfamiliar with libs/partners/anthropic/tests/cassettes/test_compaction.yaml.gz.
Review 1 high-priority file(s)
libs/partners/anthropic/tests/integration_tests/test_chat_models.py
+109
109 lines changed; Source code
libs/partners/anthropic/langchain_anthropic/chat_models.py
+26
Source code
libs/partners/anthropic/tests/unit_tests/test_chat_models.py
+7
Source code
libs/partners/anthropic/tests/cassettes/test_compaction.yaml.gz
+0
New file
libs/partners/anthropic/pyproject.toml
+2
Configuration
29
minutes to review
medium
effort level
none
staleness risk
Standard review process
Good evidence, acceptable risk, ready for merge
Why is coverage_maintained missing? Consider adding this check.