Skip to content

Conversation

@saxyguy81
Copy link

@saxyguy81 saxyguy81 commented Jan 7, 2026

Summary\n- prevent mixed content in tool_result user messages by only summarizing orphaned tool_results when no valid tool_results remain\n- truncate context before sanitization (token estimation + fallback content truncation) to avoid creating orphaned tool blocks\n- normalize Anthropic SSE errors and expand coverage\n- add missing tests/fixtures package marker; minor lint/mypy compliance tweaks\n\n## Testing\n- PYTHONPATH=. pytest tests/test_tool_result_sanitization.py tests/plugins/claude_api/unit/test_native_anthropic_sanitization.py tests/unit/llms/test_context_window_management.py tests/unit/llms/test_truncation_creates_orphans.py tests/unit/streaming/test_deferred_stream_errors.py tests/plugins/claude_sdk/integration/test_sdk_compaction_behavior.py

@saxyguy81 saxyguy81 marked this pull request as draft January 7, 2026 09:16
@saxyguy81 saxyguy81 force-pushed the fix/tool-call-streaming-dev-v0.2 branch from 943b452 to 78550bd Compare January 8, 2026 06:13
@saxyguy81 saxyguy81 marked this pull request as ready for review January 8, 2026 06:30
@saxyguy81
Copy link
Author

Ran SDK integration tests locally: ============================= test session starts ==============================
platform darwin -- Python 3.11.6, pytest-9.0.2, pluggy-1.6.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /Users/smhanan/misc/ccproxy-test
plugins: respx-0.22.0, httpx-0.36.0, anyio-4.12.0, xdist-3.8.0, timeout-2.4.0, cov-4.1.0, bdd-7.3.0, hypothesis-6.148.2, asyncio-1.3.0, mock-3.14.1, libtmux-0.52.1, Faker-19.13.0, typeguard-4.4.4, langsmith-0.4.8, benchmark-4.0.0, requests-mock-1.12.1
timeout: 300.0s
timeout method: signal
timeout func_only: False
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 0 items

============================ no tests ran in 0.10s ============================= (2 passed, 2 skipped: manual injection + compare SDK vs API).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant