mirror of
https://github.com/openai/codex.git
synced 2026-05-01 09:56:37 +00:00
feat: add a built-in Amazon Bedrock model provider (#18744)
## 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: ```toml 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.
This commit is contained in:
@@ -1027,6 +1027,17 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ModelProviderAwsAuthInfo": {
|
||||
"additionalProperties": false,
|
||||
"description": "AWS SigV4 auth configuration for a model provider.",
|
||||
"properties": {
|
||||
"profile": {
|
||||
"description": "AWS profile name to use. When unset, the AWS SDK default chain decides.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ModelProviderInfo": {
|
||||
"additionalProperties": false,
|
||||
"description": "Serializable representation of a provider definition.",
|
||||
@@ -1039,6 +1050,14 @@
|
||||
],
|
||||
"description": "Command-backed bearer-token configuration for this provider."
|
||||
},
|
||||
"aws": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ModelProviderAwsAuthInfo"
|
||||
}
|
||||
],
|
||||
"description": "AWS SigV4 auth configuration for this provider."
|
||||
},
|
||||
"base_url": {
|
||||
"description": "Base URL for the provider's OpenAI-compatible API.",
|
||||
"type": "string"
|
||||
@@ -1070,6 +1089,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"name": {
|
||||
"default": "",
|
||||
"description": "Friendly display name.",
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1124,9 +1144,6 @@
|
||||
"description": "Which wire protocol this provider expects."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MultiAgentV2ConfigToml": {
|
||||
|
||||
Reference in New Issue
Block a user