feat: add computer-use provider selection for AI agents#24772
Conversation
|
/coder-agents-review |
There was a problem hiding this comment.
Solid work. The provider abstraction is well-structured, the tool dispatch switches are consistent across all five enumeration sites, and the OpenAI runner test suite is thorough (10 action types, 16 desktop actions, key normalization table tests, mock clock for wait). The chatloop ResultProviderMetadata plumbing is cleanly integrated. The coordinate-system pinning test is a nice touch.
Severity breakdown: 2 P2, 4 P3, 2 Nit. The P2s are both in the OpenAI runner: a button-mapping gap where OpenAI sends "wheel" but the code maps "middle", and a key normalization whitelist that rejects punctuation characters needed for common shortcuts.
"An admin seeing
configured provider "openai" is not configuredwill stare at this, then open the source." (Hisoka)
site/src/pages/AgentsPage/components/VirtualDesktopSettings.tsx:109
P3 [DEREM-5] The help text still says "the Anthropic provider to be configured," but this PR adds OpenAI as a selectable alternative. An admin who selects OpenAI reads conflicting guidance.
Fix: "and the selected computer use provider to be configured," or omit the provider name entirely. (Mafuuu P3, Nami P3)
🤖
coderd/x/chatd/chattool/computeruse_test.go:462
P3 [DEREM-8] TestComputerUseTool_Run_ConnError and TestComputerUseTool_Run_InvalidInput only exercise the Anthropic code path. The OpenAI path uses a different parser (fantasyopenai.ParseComputerUseInput) with potentially different failure modes. Could we add a parallel TestComputerUseTool_Run_OpenAI_InvalidInput with malformed JSON to cover the OpenAI branch? (Bisky P3)
🤖
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
Round 2. All 9 prior findings addressed cleanly. DEREM-10 (PUT without key check) was contested by the author; the panel evaluated the defense and closed it unanimously (4/4). The runtime now surfaces a specific, actionable error at spawn time, which is consistent with how other admin-toggleable settings work.
The fix commits introduced one regression and one gap: 1 P2, 1 P3.
"The Switch is fully replaced, removing it from the DOM" (Mafuuu, on the story breakage)
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
Round 3. DEREM-16 and DEREM-17 both addressed in a2968a7. All P0-P2 findings across three rounds are resolved.
Two minor items from the final panel scan (1 P3, 1 Nit) noted inline. Neither blocks merge.
Across three rounds: 18 findings raised, 11 fixed by author, 1 closed by panel vote (4/4), 6 dropped by orchestrator. Responsive fixes with no regressions in the final pass.
"Clean decomposition of the OpenAI runner. The drag error-recovery path (mouse_up cleanup on mid-drag failure) is a nice detail." (Kite)
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
There was a problem hiding this comment.
Round 4. DEREM-20 addressed (comment added in 34c17cc). DEREM-19 acknowledged by author with substantive reasoning (OpenAI trailing screenshot is intentional UX; graceful fallback bounds consequence).
One P4 from the final panel scan noted inline (navigation key gap, sibling of DEREM-3). Does not block merge.
Full ledger across four rounds: 21 findings raised, 12 fixed by author, 1 closed by panel vote (4/4), 1 acknowledged by author, 7 dropped by orchestrator.
🤖 This review was automatically generated with Coder Agents.
a122ca1 to
f100df5
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afdf1c0c47
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
hugodutka
left a comment
There was a problem hiding this comment.
Approved, pending 1 comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91a4dfa428
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69f22accca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 651f3ff219
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4daf47f26
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
Adds a deployment-wide setting to select the computer-use provider (Anthropic or OpenAI) for AI agents, plus the OpenAI computer-use runner needed to honor that selection.
The setting is stored in
site_configsunderagents_computer_use_provider, defaults to Anthropic when unset, and is exposed via experimental GET/PUT endpoints under/api/experimental/chats/config/computer-use-provider. The chatd computer-use tool now dispatches to eitherrunAnthropicComputerUseorrunOpenAIComputerUsebased on the resolved provider, with provider-specific result metadata for OpenAI screenshots.Frontend adds a provider dropdown to the Agents Experiments settings page nested under the virtual desktop toggle, with disabled state handling while virtual desktop is off and skeleton loaders while config queries are in flight.
Hugo and Codex review follow-up:
coderd/x/chatd/chatopenai/computeruseafter rebasing onto the provider package refactor inmain.