AIMessage.invalid_tool_calls for the existing serializer while fixing silent tool-call drops reported since March 2026.
What You'll Learn
- What changed in langchain-openai 1.4.3 and why it shipped within 24 hours of the fix being merged
- How invalid tool calls leaked into assistant content and caused OpenAI-compatible endpoints to reject requests
- Why malformed tool calls silently dropped entire batches of tool calls before this release
- How to upgrade safely with pip and verify the fix with a minimal conversion test
What's New in langchain-openai 1.4.3
The langchain-openai 1.4.3 package is an integration layer that connects OpenAI API models to LangChain. It was published to PyPI on August 10, 2026 at 13:23 UTC, and it requires Python 3.10 or newer. The release is a focused patch: the official changelog lists one functional change, filter invalid tool calls from content, which was merged as pull request 39366 on August 9, 2026.
The fix targets a real production failure mode. When a model returns malformed tool calls in the v1 output format, those invalid_tool_call blocks could leak into Chat Completions assistant content. OpenAI-compatible endpoints then rejected the entire request because the content contained blocks they did not recognize. For teams running agents against local models, proxies, or third-party providers, this turned a small parsing issue into a hard request failure.
How Invalid Tool Calls Broke OpenAI-Compatible Endpoints
LangChain models that use the Responses API can return content blocks of several types, including text, reasoning, tool_call, and invalid_tool_call. When a conversation is converted from the v1 output format back to Chat Completions format, the conversion code in _compat.py strips reasoning and tool-call blocks before sending the message onward. Before 1.4.3, the block-type filter did not include invalid_tool_call, so those malformed blocks were appended to the assistant content instead of being removed.
The result was a request body that mixed plain text with half-formed tool-call entries. OpenAI-compatible endpoints, which validate payloads strictly, rejected the request. The failure was intermittent because it only appeared when a model produced a malformed tool call, which is why it was so hard to reproduce in staging.
What the 1.4.3 Fix Actually Does
The pull request that shipped in 1.4.3 is small and surgical. In the _convert_from_v1_to_chat_completions function, the block-type filter now treats invalid_tool_call the same way it treats reasoning and tool_call blocks: they are skipped during content conversion. The change is covered by a focused v1-to-Chat-Completions conversion test that injects an invalid tool call with a partial JSON argument and verifies it never reaches the output content.
Importantly, the fix does not delete the invalid call information. It preserves AIMessage.invalid_tool_calls for the existing OpenAI tool-call serializer, so debugging data such as the call ID, the partial arguments, and the parse error remain available on the message object. You lose the request-breaking behavior, not the diagnostics.
The Bug That Made All Tool Calls Silently Drop
The 1.4.3 fix is closely related to a long-running open issue in the langchain repository. Issue 35782, filed on March 12, 2026, documents a bug in _convert_delta_to_message_chunk where one malformed tool call missing its function key caused every tool call in the same batch to be silently dropped. The reporter demonstrated that a good call with an empty argument object was discarded simply because a sibling call was malformed.
That issue remains open with five comments, and it shows why developers should test tool calling against the exact provider they plan to use in production. The 1.4.3 fix addresses the related conversation-conversion path, but the streaming path in issue 35782 is a separate code area. If you upgraded and still see empty tool-call lists while streaming, check which conversion path your code is exercising.
Other Recent Fixes in langchain-openai 1.4.2 and 1.4.3
The 1.4.3 patch builds on 1.4.2, which shipped on August 7, 2026. That release added a handler for ContextWindowExceededError, so long conversations fail with a clear, typed error instead of a generic API exception. It also started filtering LangChain-generated content block IDs, preserving Responses text options, and redacting MCP authorization details from logs.
| Version | Release Date | Key Fixes |
|---|---|---|
| 1.4.2 | August 7, 2026 | Handles ContextWindowExceededError, filters content block IDs, preserves Responses text options, redacts MCP authorization |
| 1.4.3 | August 10, 2026 | Filters invalid tool calls from assistant content during v1-to-Chat-Completions conversion |
Together, the two releases remove three of the most common failure classes in agent workflows: context overflow errors, context-block pollution, and malformed tool-call rejections.
How to Upgrade to langchain-openai 1.4.3
Upgrading is a standard pip operation. The package requires Python 3.10 or newer and is compatible with Python versions below 4.0. Run the upgrade in your virtual environment, then confirm the installed version:
Run pip install --upgrade langchain-openai==1.4.3 inside your active virtual environment.
After upgrading, verify the fix with a minimal test. Create a chat model, call it through the Responses API, convert the assistant message with the internal conversion helper, and assert that no invalid_tool_call block appears in the resulting content while AIMessage.invalid_tool_calls still carries the parse error. If your code previously hit request rejections when using OpenAI-compatible providers, run the same integration test you used to reproduce the failure.
For teams that rely on OpenAI-compatible models in coding tools, upgrading both the framework and the model endpoint configuration matters, because the fix only helps when the LangChain conversion layer is the version that filters the malformed blocks.
Tool Calling Best Practices After the Fix
Even with 1.4.3 installed, tool calling works best when the code is defensive. Keep tool schemas small and use enums and object structures that make invalid states hard to represent. Set tool_choice explicitly when a step must call a tool, and handle invalid_tool_calls on the message object so parse failures become visible in logs instead of vanishing silently.
It is also worth comparing your agent framework against the alternatives before locking in a stack. Our Claude Code vs Cursor comparison covers how different agents handle tool orchestration, while the top coding AI agents list is a good starting point when you are evaluating which tooling fits your workflow.
For builders who prefer visual agent construction, our guide on building AI agents without coding explains the no-code path, and the deeper agentic AI explainer covers the architectural shift from tools to autonomous workers that makes reliable tool calling essential.
Conclusion
The langchain-openai 1.4.3 release is a small one with an outsized impact. By filtering invalid tool calls from assistant content during v1-to-Chat-Completions conversion, it removes a failure mode that made OpenAI-compatible endpoints reject otherwise valid agent requests. The fix shipped within 24 hours of the pull request being merged, and it preserves the diagnostic payload through AIMessage.invalid_tool_calls. Upgrade to 1.4.3, re-run your reproduction test, and keep an eye on issue 35782 if streaming still drops calls in your setup.