Back Home

GitHub Repo

LangChain OpenAI Integration Package Releases 1.8.1, Fixing Missing Parameters in Streaming Tool Calls

On November 17, LangChain released langchain-openai 1.8.1 to fix an issue where Responses API streaming could produce tool calls with empty arguments when argument delta events were missing. The release compares completion events with content already emitted and fills in any remaining arguments.

Black-hole-diver · CC BY-SA 4.0 · Image source
zh-Hant

On November 17, LangChain released version 1.8.1 of its Python integration package, langchain-openai, including a streaming tool call fix merged that day. Maintainers said that when ChatOpenAI uses Responses API streaming, the API may fail to send incremental events for tool arguments. In that case, the integration could return a tool call with empty arguments, preventing downstream agents from getting the complete input. Release notes

The issue involved how streaming events are assembled into tool calls. According to the fix description, the package previously emitted arguments incrementally through function_call_arguments.delta events, but maintainers observed that the API sometimes sent only the final function_call_arguments.done event. If the integration relied only on delta events, it might not pass the arguments on to the application, even when the completion event included them. The new version records the arguments already emitted for each function call in the streaming loop, then compares them with the completion event and emits any remaining content. Maintainer explanation

This fix affects the reliability of agent execution. LangChain’s official documentation explains that tool calls place the tool name and input in the standardized tool_calls field, which applications can use to execute functions. Based on this interface, missing arguments could lead to required-field validation failures or cause a tool to receive incomplete input. The documentation also notes that some features automatically route requests to the Responses API, so engineers troubleshooting the issue should confirm which API path is actually in use. Integration documentation

Teams using streaming tool calls should check their pinned integration package version and verify the upgrade with a scenario in which delta events are missing and only the completion event arrives. They should also confirm that arguments are not concatenated more than once during normal incremental output. Public evidence confirms that LangChain released a fix, but does not specify how often the upstream events are missing, the full range of affected models, or the earliest affected version; it does not establish that all tool calls were affected.

Sources

  1. langchain-openai 1.8.1 發布紀錄
  2. fix(openai): recover function call args from done events #41923
  3. ChatOpenAI integration