GitHub Repo
LangChain DeepSeek 1.1.1 Fixes Endpoint Switching to Route Strict Tool Calls to the Beta API
The update rebuilds connection clients, fixing an issue that left requests using the old endpoint after strict mode was enabled. Custom API URLs are not rewritten automatically, so schema and connection settings should be checked after upgrading.

LangChain released langchain-deepseek 1.1.1 on September 22, shipping the endpoint fix for strict tool calling in the official package. PyPI also lists files uploaded that day. The patch was merged on September 7; the news here is the package release. [Release notes](https://github.com/langchain-ai/langchain/releases/tag/langchain-deepseek==1.1.1), [PyPI](https://pypi.org/project/langchain-deepseek/1.1.1/)
The issue stemmed from a mismatch between the configuration object and the actual connection. Previously, enabling strict mode during tool binding or structured output setup copied the model and rewrote its API URL. However, the copy operation did not rerun validators, leaving the underlying clients pointed at the original endpoint. Maintainers noted that the setting appeared to be enabled, but the server was not performing the expected strict schema validation. [Patch discussion](https://github.com/langchain-ai/langchain/pull/40249)
The current public implementation clears the synchronous, asynchronous, and root clients in the copied instance, then invokes the environment validation routine to rebuild the connections. This applies the URL change to the objects that actually send requests, while allowing the original model instance to retain its own settings. However, automatic switching occurs only when the URL matches the package default. Enterprise gateways and explicitly configured URLs still require separate handling. [Client implementation](https://raw.githubusercontent.com/langchain-ai/langchain/master/libs/partners/deepseek/langchain_deepseek/chat_models.py)
DeepSeek’s official documentation requires strict mode to use the Beta endpoint and strict to be set on each tool function. All fields in objects at every nesting level must be marked as required, and additional properties must be disallowed. Unsupported schemas are rejected. In practice, a request that succeeded before the upgrade may return a schema error afterward. This is a behavioral difference to investigate once validation takes effect. [API specification](https://api-docs.deepseek.com/guides/tool_calls/)
The same release also maps prompt cache hit usage to the common cache-read field, allowing observability tools to recognize this portion of input usage. This is a correction to usage accounting. When interpreting reports, teams should first rule out differences caused by the newly populated field before assessing whether request costs have actually fallen. Keeping the package version, endpoint settings, and raw responses together makes later investigation easier. [Release changes](https://github.com/langchain-ai/langchain/releases/tag/langchain-deepseek==1.1.1)
For teams feeding tool outputs into databases or workflows, this fix makes format constraints more reliable. Acceptance testing should verify the actual request URL, test synchronous and asynchronous calls separately, and use an unsupported schema to confirm that the server rejects it. Teams that inject custom clients should also recheck proxy, header, and transport settings. Acceptance testing should retain parsing errors as well, so retries do not mask cases of structural noncompliance. Meeting format constraints still does not guarantee that field values are correct; the application remains responsible for business rules and permission checks.