Skip to content

feat: allow computer use on Claude models from AWS Bedrock AI providers - #31745

Merged
ethanndickson merged 5 commits into
mainfrom
ethan/codagt-1525-allow-computer-use-with-claude-models-from-aws-bedrock-ai
Nov 6, 2026
Merged

ethanndickson merged 5 commits into
mainfrom
ethan/codagt-1525-allow-computer-use-with-claude-models-from-aws-bedrock-ai

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Closes https://linear.app/codercom/issue/CODAGT-1525/allow-computer-use-with-claude-models-from-aws-bedrock-ai-providers

Computer use was only available on models from Anthropic and OpenAI AI providers, as we decided support from the AI provider type alone, in five separate places (spawn, turn setup, override validation, telemetry and the settings UI). A Bedrock AI provider serves Claude models over the Anthropic Messages API though, and chatd already routes those through the Anthropic fantasy client, so there's no reason computer use shouldn't work on them.

To fix, there's now a single rule, chatprovider.ComputerUseProvider(providerType, model), derived from the client chatd builds for the model (chatprovider.ClientProvider, previously aibridgeClientProvider). If the model uses the Anthropic client, it gets the Anthropic computer use tool. The OpenAI tool is still only offered on OpenAI AI providers, as I haven't tested it against Bedrock Mantle, and I couldn't find anyone else doing it either. All five places now call this function.

The UI can't re-derive Bedrock routing without duplicating the model ID heuristic, so ChatModel gets a read-only computer_use_provider field (anthropic, openai, or omitted when computer use isn't supported). The computer use model override endpoint now accepts Bedrock Claude models, and its 400 message has changed.

Whilst in here I also fixed a latent bug where the default model credential check looked up the user's keys under the tool flavour (anthropic) instead of the provider type (bedrock).

One caveat: on a Bedrock AI provider using InvokeModel, AI Gateway runs the provider's configured model rather than the chat model, whilst we pick the computer use tool version from the chat model ID. It's not specific to computer use, and should go away with AIGOV-747. In the meantime, #30752 warns when an InvokeModel provider ignores the chat model identifier.

@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

CODAGT-1525

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T01:26:31.546130Z 76cefc5 Manual request
🔒 Security Review ✅ Completed 2026-11-04T05:46:35.483682Z 9f56c4c Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 9f56c4c0bc

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 9f56c4c0bc

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ethanndickson
ethanndickson marked this pull request as ready for review November 4, 2026 06:42
…file docs

Assert computer_use_provider on PATCH, drop duplicate Bedrock rows from
TestComputerUseProvider, make the dated Bedrock ID catalog test use a
curated stem, and tell admins to use the Claude model ID behind an
application inference profile.
Move the InvokeModel guidance out of a callout, expand ARN, split the
spawn_agent requirement sentence, and describe computer_use_provider
without internal names.
@ethanndickson
ethanndickson force-pushed the ethan/codagt-1525-allow-computer-use-with-claude-models-from-aws-bedrock-ai branch from 5bbd295 to 372123b Compare November 5, 2026 06:17

@pawbana pawbana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not that familiar with chatd code but generally LGTM.

Agent I asked for review flagged that coderd/x/chatd/ARCHITECTURE.md:1223 is now out of date as it states about computer use that The AI provider type of the resolved model must be Anthropic or OpenAI:

`computer_use` subagents resolve their model separately: the organization admin defines `computer_use` model or the default chat model gets used. Personal overrides do not apply to this subagent type. The AI provider type of the resolved model must be Anthropic or OpenAI (because it selects the computer use tool flavor). If a different provider type is selected - the spawn fails with a tool error that names the reason. An override whose model became unusable or moved to another provider type `computer_use` falls back to the default model.

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 76cefc5171

ℹ️ 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".

@ethanndickson
ethanndickson merged commit f8ab27f into main Nov 6, 2026
30 of 31 checks passed
@ethanndickson
ethanndickson deleted the ethan/codagt-1525-allow-computer-use-with-claude-models-from-aws-bedrock-ai branch November 6, 2026 02:12
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants