langchain-openai==1.1.9
A critical fix for developers using images with OpenAI models just dropped.
Deep Dive
LangChain released version 1.1.9 of its OpenAI integration, primarily fixing a bug where URLs were not properly sanitized when counting tokens in images. This could lead to inaccurate billing or context window errors. The update also introduces a new ContextOverflowError for better handling of long inputs and adds model profiling features for tracking text inputs and outputs, improving developer control and cost management.
Why It Matters
This patch prevents potential overbilling and improves reliability for apps processing images through OpenAI's API.