[GH-ISSUE #988] [langchain]: Anthropic prompt caching wrong import #126

Closed
opened 2026-02-17 17:19:14 -05:00 by yindo · 1 comment
Owner

Originally created by @srtab on GitHub (Oct 19, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/988

Type of issue

issue / bug

Language

Python

Description

Anthropic prompt caching documentation (https://docs.langchain.com/oss/python/langchain/middleware#anthropic-prompt-caching) is pointing to wrong import: from langchain.agents.middleware.prompt_caching import AnthropicPromptCachingMiddleware and i think the correct import is from langchain_anthropic.middleware.prompt_caching import AnthropicPromptCachingMiddleware.

Originally created by @srtab on GitHub (Oct 19, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/988 ### Type of issue issue / bug ### Language Python ### Description Anthropic prompt caching documentation (https://docs.langchain.com/oss/python/langchain/middleware#anthropic-prompt-caching) is pointing to wrong import: `from langchain.agents.middleware.prompt_caching import AnthropicPromptCachingMiddleware` and i think the correct import is `from langchain_anthropic.middleware.prompt_caching import AnthropicPromptCachingMiddleware`.
yindo added the langchain label 2026-02-17 17:19:14 -05:00
yindo closed this issue 2026-02-17 17:19:14 -05:00
Author
Owner

@mdrxy commented on GitHub (Oct 19, 2025):

Fixing, thanks!

@mdrxy commented on GitHub (Oct 19, 2025): Fixing, thanks!
yindo changed title from [langchain]: Anthropic prompt caching wrong import to [GH-ISSUE #988] [langchain]: Anthropic prompt caching wrong import 2026-06-05 17:25:11 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#126