Skip to content

feat: add a built-in Amazon Bedrock model provider#18744

Merged
celia-oai merged 6 commits intomainfrom
dev/cc/new-model-provider
Apr 21, 2026
Merged

feat: add a built-in Amazon Bedrock model provider#18744
celia-oai merged 6 commits intomainfrom
dev/cc/new-model-provider

Conversation

@celia-oai
Copy link
Copy Markdown
Collaborator

@celia-oai celia-oai commented Apr 20, 2026

Why

Codex needs a first-class amazon-bedrock model provider so users can select Bedrock without copying a full provider definition into config.toml. The provider has Codex-owned defaults for the pieces that should stay consistent across users: the display name, Bedrock base_url, and wire_api.

At the same time, users still need a way to choose the AWS credential profile used by their local environment. This change makes amazon-bedrock a partially modifiable built-in provider: code owns the provider identity and endpoint defaults, while user config can set model_providers.amazon-bedrock.aws.profile.

For example:

model_provider = "amazon-bedrock"

[model_providers.amazon-bedrock.aws]
profile = "codex-bedrock"

What Changed

  • Added amazon-bedrock to the built-in model provider map with:
    • name = "Amazon Bedrock"
    • base_url = "https://bedrock-mantle.us-east-1.api.aws/v1"
    • wire_api = "responses"
  • Added AWS provider auth config with a profile-only shape: model_providers.<id>.aws.profile.
  • Kept AWS auth config restricted to amazon-bedrock; custom providers that set aws are rejected.
  • Allowed model_providers.amazon-bedrock through reserved-provider validation so it can act as a partial override.
  • During config loading, only aws.profile is copied from the user-provided amazon-bedrock entry onto the built-in provider. Other Bedrock provider fields remain hard-coded by the built-in definition.
  • Updated the generated config schema for the new provider AWS profile config.

@celia-oai celia-oai force-pushed the dev/cc/new-model-provider branch 3 times, most recently from e4ccb7b to b666344 Compare April 20, 2026 22:41
@celia-oai celia-oai changed the title draft feat: add a built-in Amazon Bedrock model provider Apr 20, 2026
@celia-oai celia-oai marked this pull request as ready for review April 20, 2026 22:44
@celia-oai celia-oai requested a review from a team as a code owner April 20, 2026 22:44
@celia-oai celia-oai requested a review from pakrym-oai April 20, 2026 22:44
@celia-oai
Copy link
Copy Markdown
Collaborator Author

@codex review

@celia-oai celia-oai force-pushed the dev/cc/new-model-provider branch from 7efbb43 to 62a553c Compare April 20, 2026 22:47
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b666344306

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

Comment thread codex-rs/model-provider-info/src/lib.rs
Comment thread codex-rs/core/config.schema.json
Comment thread codex-rs/core/config.schema.json
Comment thread codex-rs/config/src/config_toml.rs
Comment thread codex-rs/core/src/config/mod.rs Outdated
Comment thread codex-rs/core/src/config/config_tests.rs Outdated
@celia-oai celia-oai force-pushed the dev/cc/new-model-provider branch 2 times, most recently from 8b143a6 to 074bf06 Compare April 20, 2026 23:52
@celia-oai celia-oai force-pushed the dev/cc/new-model-provider branch 2 times, most recently from 34ed742 to ad93f1e Compare April 21, 2026 00:03
@celia-oai celia-oai enabled auto-merge (squash) April 21, 2026 00:05
@celia-oai celia-oai force-pushed the dev/cc/new-model-provider branch from ad93f1e to d946bfa Compare April 21, 2026 00:10
@celia-oai celia-oai force-pushed the dev/cc/new-model-provider branch from 80ee364 to 6f9804a Compare April 21, 2026 00:25
@celia-oai celia-oai merged commit cefcfe4 into main Apr 21, 2026
25 of 26 checks passed
@celia-oai celia-oai deleted the dev/cc/new-model-provider branch April 21, 2026 00:54
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 21, 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