feat: add managed Amazon Bedrock login#31326
Conversation
e8a19f9 to
35ebf5d
Compare
fc7cbe0 to
fa240d8
Compare
159f579 to
7da3ba3
Compare
6702939 to
01f9bf1
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a228c77c7b
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a74bbdc5b8
ℹ️ 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".
## Why App-server clients can report whether Amazon Bedrock is using AWS-managed credentials or a Codex-managed API key, but they do not have a matching API for creating the managed login. This PR defines that experimental wire contract independently from its implementation. Managed Bedrock API keys are already a primary `CodexAuth` mode. The API therefore describes a normal Codex login that replaces the current stored auth rather than introducing provider-scoped credential storage. ## What changed - Add the experimental `amazonBedrock` variant to `account/login/start`. - Accept an API key and AWS region and return a matching discriminated response. - Gate the request behind the app-server `experimentalApi` capability. - Regenerate the JSON and TypeScript protocol schemas. - Document the login contract, notifications, primary-auth replacement semantics, restart boundary, and non-transactional durable writes. ## Impact This PR defines the API shape but does not implement login behavior. The next PR adds validation, persistence through the existing Codex auth lifecycle, provider selection, and notifications. ## Validation - `just test -p codex-app-server-protocol` ## Stack 1. **#31327 Managed Bedrock experimental API** — base: `main` 2. #31326 Managed Bedrock login — base: `codex/managed-bedrock-api` 3. #31325 Managed Bedrock logout — base: `codex/managed-bedrock-login-v2`
f554c58 to
c31ae26
Compare
Why
The app-server protocol can describe a Codex-managed Amazon Bedrock login, but clients still need the server-side implementation to onboard users without manipulating
auth.jsonorconfig.tomlthemselves.Because a managed Bedrock API key is primary
CodexAuthstate, login should use the existing auth persistence and reload lifecycle. This keeps credential replacement, account reporting, and login notifications consistent with the other supported login methods instead of introducing a separate provider-specific credential cache.What changed
amazonBedrockbranch ofaccount/login/start.model_providertoamazon-bedrockwithout overriding a command-line provider selection.AuthManager, and reload config for account reads soaccount/readand auth-status responses immediately reflect the selected Bedrock provider.account/login/completedandaccount/updatednotifications.Operational notes
Managed Bedrock login replaces the currently stored primary Codex login. Existing loaded sessions retain their provider selection, so clients should restart the app-server before sending further model requests. This will be fixed in a followup.
Validation
just test -p codex-app-server -E 'test(/suite::v2::account/)'— 40 passedus-east-2: rantarget/debug/codex-app-server-test-clientwithtest-login --amazon-bedrock, observed successfulaccount/login/start,account/login/completed, andaccount/updatedresponses, confirmedconfig.tomlselectedamazon-bedrock, confirmedauth.jsonpersisted only the managed Bedrock API-key auth and region with no OpenAI API key, and successfully completed a model request through a freshtarget/debug/codexprocess. real events log:Stack
main)codex/managed-bedrock-api)codex/managed-bedrock-login-v2)