[GH-ISSUE #2500] [FEAT]: Prompt Caching for Claude Sonnet 3.5 #1620

Closed
opened 2026-02-22 18:25:42 -05:00 by yindo · 3 comments
Owner

Originally created by @brian12184 on GitHub (Oct 18, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2500

Originally assigned to: @shatfield4 on GitHub.

What would you like to see?

It would be helpful to support prompt caching for Claude 3.5 Sonnet. This not only helps cut down on LLM costs, but also latency.

https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching

This can be done by adding an extra header, as an example...

with anthropic_client.beta.prompt_caching.messages.stream( system=system_prompt, model="claude-3-5-sonnet-20240620", max_tokens=8000, temperature=0, messages=messages, extra_headers={"anthropic-beta": "prompt-caching-2024-07-31"} ) as stream:

Originally created by @brian12184 on GitHub (Oct 18, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2500 Originally assigned to: @shatfield4 on GitHub. ### What would you like to see? It would be helpful to support prompt caching for Claude 3.5 Sonnet. This not only helps cut down on LLM costs, but also latency. https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching This can be done by adding an extra header, as an example... `with anthropic_client.beta.prompt_caching.messages.stream( system=system_prompt, model="claude-3-5-sonnet-20240620", max_tokens=8000, temperature=0, messages=messages, extra_headers={"anthropic-beta": "prompt-caching-2024-07-31"} ) as stream:`
yindo added the enhancementIntegration Requestfeature request labels 2026-02-22 18:25:42 -05:00
yindo closed this issue 2026-02-22 18:25:42 -05:00
Author
Owner

@Ramadas108 commented on GitHub (Nov 29, 2024):

Yes! It will be very helpful!

@Ramadas108 commented on GitHub (Nov 29, 2024): Yes! It will be very helpful!
Author
Owner

@collectifweb commented on GitHub (Dec 17, 2024):

+1 it would be great indeed.

@collectifweb commented on GitHub (Dec 17, 2024): +1 it would be great indeed.
Author
Owner

@Big-Szu commented on GitHub (Nov 3, 2025):

+1 Much needed

@Big-Szu commented on GitHub (Nov 3, 2025): +1 Much needed
yindo changed title from [FEAT]: Prompt Caching for Claude Sonnet 3.5 to [GH-ISSUE #2500] [FEAT]: Prompt Caching for Claude Sonnet 3.5 2026-06-05 14:41:46 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1620