Repository navigation
feat: allow computer use on Claude models from AWS Bedrock AI providers - #31745
Conversation
|
@codex review |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ 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 Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…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.
5bbd295 to
372123b
Compare
pawbana
left a comment
There was a problem hiding this comment.
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:
coder/coderd/x/chatd/ARCHITECTURE.md
Line 1223 in 372123b
…s Anthropic models
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ 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". |
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, previouslyaibridgeClientProvider). 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
ChatModelgets a read-onlycomputer_use_providerfield (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.