Agent Frameworks

LangChain-OpenAI 1.3.5 adds explicit prompt caching support

Developers can now manually control prompt caching for OpenAI models in LangChain.

Deep Dive

LangChain has released langchain-openai==1.3.5, a minor but impactful update to its popular OpenAI integration library. The headline feature is explicit prompt caching (via PR #38762), which allows developers to manually define cache keys for frequently used prompts. This moves beyond automatic caching to give fine-grained control over when and how responses are reused — critical for applications with heavy prompt repetition, like chatbots or RAG pipelines.

The release also includes a refresh of model profile data (PR #38774) to keep up with OpenAI's latest model offerings. The package, part of the larger LangChain ecosystem (141k stars on GitHub), streamlines building LLM-powered applications. This update is particularly useful for production deployments aiming to reduce API costs and latency without sacrificing flexibility.

Key Points
  • Explicit prompt caching support (PR #38762) for manual cache key management
  • Model profile data refresh to align with current OpenAI model versions
  • Patch release (1.3.5) available on PyPI, following 1.3.4

Why It Matters

Gives developers finer control over OpenAI API costs and latency in production LangChain apps.

📬 Get the top 10 AI stories daily