mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Allow Bedrock Runtime selection during setup and login (#62222)
## Why The app server's Bedrock setup and login flows always selected Mantle. Clients using Bedrock Runtime had to configure that provider separately. ## What changed Accept an optional `providerId` in `account/bedrock/setup` for AWS profiles and environment credentials, and in `account/login/start` for Bedrock API keys and AWS access keys. Pass `"amazon-bedrock-runtime"` to select Runtime. Omit the field or pass `null` to keep the Mantle default. Save configuration for the selected provider and check that provider for an existing `aws.credential_export` before changing credential sources. ## Testing Extend app-server tests to cover Runtime setup with profiles and environment credentials, Runtime login with both key types, and Mantle fallback. Verify that environment setup selects the Runtime default model for a new thread and that a configured Runtime credential exporter blocks profile setup. GitOrigin-RevId: 6396b638208ab9b12f50f13f13bd517a919d0848
This commit is contained in:
@@ -759,7 +759,11 @@ impl AuthModeWidget {
|
||||
BedrockCredential::ApiKey(api_key) => request_handle
|
||||
.request_typed::<LoginAccountResponse>(ClientRequest::LoginAccount {
|
||||
request_id,
|
||||
params: LoginAccountParams::AmazonBedrock { api_key, region },
|
||||
params: LoginAccountParams::AmazonBedrock {
|
||||
api_key,
|
||||
region,
|
||||
provider_id: None,
|
||||
},
|
||||
})
|
||||
.await
|
||||
.map_err(|error| error.to_string())
|
||||
@@ -772,7 +776,11 @@ impl AuthModeWidget {
|
||||
BedrockCredential::Profile(profile) => request_handle
|
||||
.request_typed::<BedrockSetupResponse>(ClientRequest::BedrockSetup {
|
||||
request_id,
|
||||
params: BedrockSetupParams::Profile { profile, region },
|
||||
params: BedrockSetupParams::Profile {
|
||||
profile,
|
||||
region,
|
||||
provider_id: None,
|
||||
},
|
||||
})
|
||||
.await
|
||||
.map(|_| ())
|
||||
@@ -780,7 +788,10 @@ impl AuthModeWidget {
|
||||
BedrockCredential::Environment => request_handle
|
||||
.request_typed::<BedrockSetupResponse>(ClientRequest::BedrockSetup {
|
||||
request_id,
|
||||
params: BedrockSetupParams::Environment { region },
|
||||
params: BedrockSetupParams::Environment {
|
||||
region,
|
||||
provider_id: None,
|
||||
},
|
||||
})
|
||||
.await
|
||||
.map(|_| ())
|
||||
@@ -797,6 +808,7 @@ impl AuthModeWidget {
|
||||
secret_access_key,
|
||||
session_token,
|
||||
region,
|
||||
provider_id: None,
|
||||
},
|
||||
})
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user