Repository navigation
fix(caching): stop counting an unrun server tool call mark, and follow #49192 and #35602 in their integration tests - #49468
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
1 similar comment
[Medium impact] The PR appears safe to merge, with no outstanding findings SummaryFixes cache-breakpoint counting so an unrun Anthropic server tool call does not consume a slot
Reviews (4) · Last reviewed commit: "test(integration): assert the Gemini cac..." · Reviewed by Greptile |
…rompt Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will not alter performance1 warning
Comparing |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ee85bec. Configure here.
Six integration tests went red on main's scheduled run after #49192 and #35602 landed. Five of them expected the old responses, and one caught a real census bug where the cache_control injection counted a marked web search call that Anthropic never receives, so the system prompt lost its cache breakpoint even with a slot free
Details
TLDR
Problem this solves:
How it solves it:
message.refusal, Snowflakestop_detailsand the Responses cache hit shapeUser Flow
Before: a developer replays a Claude turn with an unrun web search and gets no system prompt breakpoint
cache_control_injection_pointsfor the system message and the last messagesrvtoolu_web search with no resultAfter: the same request fills the free slot with the system prompt
Pre-Submission checklist
Screenshots / Proof of Fix
Shared setup is one proxy per side on
anthropic/claude-sonnet-5-5with a real Anthropic key andcache_control_injection_pointsof{location: message, role: system}and{location: message, index: -1}. Each side gets the same POST /v1/chat/completions, a system message, a marked ask, an assistant turn with markedcall_weather_london,call_weather_parisandsrvtoolu_webcalls, the two tool results, then a new user message. The outbound Anthropic body comes from--detailed_debugCommands, run once per side (
--port 4001on the base worktree,--port 4002on the tip)Before (aea0e4f)
Live proxy
prompt_tokens589srvtoolu_webalready droppedIntegration suite
INTEGRATION_WORKERS=2 tests/integration/run.py providerson the two files gives 13 failed, 143 passedAfter (ee85bec)
Live proxy
prompt_tokens589Integration suite
Type
🐛 Bug Fix
✅ Test
Caveats (if any)
Medium
Low
Final Attestation