langchain - 💡(How to fix) Fix Update deprecated OpenAI computer-use-preview support for the current OpenAI `computer` tool [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Because computer-use-preview is deprecated and will no longer be usable, backward compatibility for that preview-specific path should not be necessary. In addition, the preview model was not broadly available as a general public model, so maintaining the old path may not be worth the added complexity.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Submission checklist

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-openrouter
  • langchain-perplexity
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Feature Description

LangChain currently has a legacy OpenAI computer-use implementation that was designed around the computer-use-preview model. OpenAI has deprecated computer-use-preview and recommends migrating to the current Responses API computer tool.

This feature request is to update LangChain's OpenAI computer-use support so that the current OpenAI computer tool works through the same standard tool-call / agent-loop pattern used by other provider integrations, such as Anthropic and Google.

The requested behavior is:

  1. Treat the current OpenAI Responses API computer tool as the primary OpenAI computer-use path.
  2. Expose OpenAI model-requested computer actions as executable LangChain tool calls, or an equivalent LangChain-native executable representation.
  3. Allow create_agent() and the standard LangChain agent loop to execute OpenAI computer actions.
  4. Return action results to OpenAI as computer_call_output, while preserving the original OpenAI call_id.
  5. Remove or replace assumptions specific to the deprecated computer-use-preview path.

Because computer-use-preview is deprecated and will no longer be usable, backward compatibility for that preview-specific path should not be necessary. In addition, the preview model was not broadly available as a general public model, so maintaining the old path may not be worth the added complexity.

Use Case

Developers should be able to build OpenAI computer-use agents with the same LangChain patterns used for other providers.

For example, Anthropic and Google computer-use integrations can return executable LangChain tool calls that are handled by the standard agent loop. OpenAI's current Responses API computer tool should work similarly.

This is especially important for applications that need provider-agnostic computer-use agents. In those systems, the model may request actions such as screenshots, clicks, typing, scrolling, or other computer operations. LangChain should surface those requests in a way that the standard agent loop can execute.

This is closely related to issue #37937:

https://github.com/langchain-ai/langchain/issues/37937

In that issue, I described the concrete execution problem: OpenAI's current Responses API computer tool returns a valid computer_call, but LangChain keeps it in AIMessage.content, so create_agent() does not execute the requested computer action.

This feature request focuses on the broader migration path: since computer-use-preview is deprecated, now seems like the right time to update the OpenAI computer-use integration around the current computer tool and make it consistent with LangChain's other computer-use integrations.

Proposed Solution

Update the OpenAI computer-use implementation so that the current Responses API computer tool participates in the standard LangChain tool-call / agent-loop flow.

At a high level, the implementation should:

  1. Detect OpenAI Responses API computer_call items.
  2. Convert those items into executable LangChain tool calls, or an equivalent LangChain-native representation.
  3. Preserve the OpenAI call_id across the action execution and computer_call_output round trip.
  4. Return screenshot results using the current computer_call_output.output.type == "computer_screenshot" shape.
  5. Remove or replace preview-specific assumptions from the old computer-use-preview implementation.
  6. Avoid maintaining backward compatibility for computer-use-preview, since this path is deprecated and will no longer be usable.

I already have a local prototype that addresses this feature request together with #37937. The code has been tested in a production-level computer-use environment. The environment itself is research-related and cannot be shared publicly, but the modified LangChain code successfully executes OpenAI computer-use actions through the standard agent/tool-call flow.

If this direction sounds acceptable, I would be happy to open a PR with tests.

Alternatives Considered

One alternative would be to keep the existing computer-use-preview path and add a separate implementation for the current OpenAI computer tool.

I do not think this is ideal because computer-use-preview is deprecated and will no longer be usable. Keeping the preview-specific path as a first-class implementation may add unnecessary complexity.

Another alternative would be to keep exposing OpenAI computer_call items only through AIMessage.content and require users to implement a custom execution loop. This works for advanced users, but it is inconsistent with Anthropic and Google computer-use integrations and makes OpenAI computer use difficult to use with normal LangChain agent workflows.

Additional Context

This feature request is related to issue #37937:

https://github.com/langchain-ai/langchain/issues/37937

Issue #37937 focuses on the current execution failure: OpenAI returns a valid computer_call, but LangChain does not execute it as a tool call.

This feature request focuses on the migration and design direction: because computer-use-preview is deprecated, LangChain should update the OpenAI computer-use integration around the current Responses API computer tool and make it consistent with the standard LangChain tool-call / agent-loop pattern.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING