Skip to content

feat: expose AWS account state from account/read#19048

Merged
celia-oai merged 3 commits intomainfrom
codex/app-server-aws-account-read
Apr 24, 2026
Merged

feat: expose AWS account state from account/read#19048
celia-oai merged 3 commits intomainfrom
codex/app-server-aws-account-read

Conversation

@celia-oai
Copy link
Copy Markdown
Collaborator

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

Why

AWS/Bedrock mode currently reports account: null with requiresOpenaiAuth: false from account/read. That suppresses the OpenAI-auth requirement, but it does not let app clients distinguish AWS auth from any other non-OpenAI custom provider. For the prototype AWS provider UX, clients need a simple provider-derived signal so they can suppress ChatGPT/API-key login and token-refresh paths without hardcoding Bedrock checks.

What changed

  • Adds an aws variant to the v2 Account protocol union.
  • Adds ProviderAccountKind to codex-model-provider so the runtime provider owns the app-visible account classification.
  • Makes Amazon Bedrock return ProviderAccountKind::Aws from the model-provider layer.
  • Updates app-server account/read to map ProviderAccountKind to the existing GetAccountResponse wire shape.
  • Preserves the existing account: null, requiresOpenaiAuth: false behavior for other non-OpenAI providers.
  • Regenerates the app-server protocol schema fixtures.
  • Adds coverage for provider account classification and for the Amazon Bedrock account/read response.

Testing

  • cargo test -p codex-model-provider
  • cargo test -p codex-app-server-protocol
  • cargo test -p codex-app-server get_account_with_aws_provider

Notes

I attempted just bazel-lock-update and just bazel-lock-check, but both are blocked in my local environment because bazel is not installed.

@celia-oai celia-oai requested a review from pakrym-oai April 22, 2026 22:30
@celia-oai celia-oai changed the title Expose AWS account state from account/read fet: expose AWS account state from account/read Apr 22, 2026
@celia-oai celia-oai changed the title fet: expose AWS account state from account/read feat: expose AWS account state from account/read Apr 22, 2026
@celia-oai celia-oai force-pushed the codex/app-server-aws-account-read branch from 8edc6e9 to 9cf7ecc Compare April 23, 2026 00:52
@celia-oai celia-oai changed the title feat: expose AWS account state from account/read Expose AWS account state from account/read Apr 23, 2026
@celia-oai celia-oai force-pushed the codex/app-server-aws-account-read branch 2 times, most recently from 09fba66 to 81346ae Compare April 23, 2026 01:02
@celia-oai celia-oai changed the title Expose AWS account state from account/read feat: expose AWS account state from account/read Apr 23, 2026
@celia-oai celia-oai force-pushed the codex/app-server-aws-account-read branch from 81346ae to 3638e9c Compare April 23, 2026 01:14
Comment thread codex-rs/app-server-protocol/src/protocol/v2.rs Outdated
Comment thread codex-rs/model-provider/src/provider.rs Outdated
Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai left a comment

Choose a reason for hiding this comment

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

Provider should probably be returning an account instance and encapsulate the logic that is used to populate it.

@celia-oai celia-oai force-pushed the codex/app-server-aws-account-read branch from 3638e9c to 497ed38 Compare April 23, 2026 01:41
@celia-oai celia-oai force-pushed the codex/app-server-aws-account-read branch from 497ed38 to 9df4d86 Compare April 23, 2026 01:55
@celia-oai celia-oai requested a review from pakrym-oai April 23, 2026 02:02
@celia-oai celia-oai enabled auto-merge (squash) April 24, 2026 01:40
@celia-oai celia-oai merged commit 432771c into main Apr 24, 2026
25 checks passed
@celia-oai celia-oai deleted the codex/app-server-aws-account-read branch April 24, 2026 01:53
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 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