fix: strip cache_control fields from content blocks (#189)
Claude Code CLI sends cache_control on text, thinking, tool_use, and tool_result blocks for prompt caching. Cloud Code API rejects these with "Extra inputs are not permitted". - Add cleanCacheControl() to proactively strip cache_control at pipeline entry - Add sanitizeTextBlock() and sanitizeToolUseBlock() for defense-in-depth - Update reorderAssistantContent() to use block sanitizers - Add test-cache-control.cjs with multi-model test coverage - Update frontend dashboard tests to match current UI design - Update strategy tests to match v2.4.0 fallback behavior - Update CLAUDE.md and README.md with recent features Inspired by Antigravity-Manager's clean_cache_control_from_messages() pattern. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,8 @@
|
||||
"test:oauth": "node tests/test-oauth-no-browser.cjs",
|
||||
"test:emptyretry": "node tests/test-empty-response-retry.cjs",
|
||||
"test:sanitizer": "node tests/test-schema-sanitizer.cjs",
|
||||
"test:strategies": "node tests/test-strategies.cjs"
|
||||
"test:strategies": "node tests/test-strategies.cjs",
|
||||
"test:cache-control": "node tests/test-cache-control.cjs"
|
||||
},
|
||||
"keywords": [
|
||||
"claude",
|
||||
|
||||
Reference in New Issue
Block a user