Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: agent using sonnet does not cache prompt #5316

Open
1 task done
anandthakker opened this issue Jan 15, 2025 · 1 comment
Open
1 task done

[Bug]: agent using sonnet does not cache prompt #5316

anandthakker opened this issue Jan 15, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@anandthakker
Copy link

What happened?

Using a 2K+ token system prompt, if I use it directly with claude-3-5-sonnet-20241022, I can see the cache writes in my Anthopic console. If instead I use a very similar (but not identical) prompt in an agent using the same model, I don't see the cache writes. Is it possible that the prompt caching settings aren't making it through? (I tried to poke around in the code, but I don't actually see the code for the agent stuff in the source tree -- looks like you're keeping that private?)

Steps to Reproduce

  1. Check the Anthropic console usage view, and note the current number of cache writes
  2. Choose Anthropic / claude-3-5-sonnet-20241022
  3. In the right-hand panel, paste in a long set of custom instructions
  4. Send a message and check for new cache writes.

Try again with an agent:
0. Note the current cache writes in anthropic console.

  1. Choose Agent and then, using the agent builder, choose the same model, and confirm that prompt caching is enabled
  2. Paste in the same custom instructions from step 2, but alter the first line.
  3. Send a message and check for new cache writes.

When I do this, I see new writes in the first case, but not the second.

What browsers are you seeing the problem on?

Safari

Relevant log output

No response

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@anandthakker anandthakker added the bug Something isn't working label Jan 15, 2025
@danny-avila
Copy link
Owner

It's not yet implemented still, this is a planned update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants