feat: expose AWS account state from account/read#19048
Merged
Conversation
8edc6e9 to
9cf7ecc
Compare
09fba66 to
81346ae
Compare
81346ae to
3638e9c
Compare
pakrym-oai
reviewed
Apr 23, 2026
pakrym-oai
reviewed
Apr 23, 2026
pakrym-oai
reviewed
Apr 23, 2026
Collaborator
pakrym-oai
left a comment
There was a problem hiding this comment.
Provider should probably be returning an account instance and encapsulate the logic that is used to populate it.
3638e9c to
497ed38
Compare
497ed38 to
9df4d86
Compare
pakrym-oai
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
AWS/Bedrock mode currently reports
account: nullwithrequiresOpenaiAuth: falsefromaccount/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
awsvariant to the v2Accountprotocol union.ProviderAccountKindtocodex-model-providerso the runtime provider owns the app-visible account classification.ProviderAccountKind::Awsfrom the model-provider layer.account/readto mapProviderAccountKindto the existingGetAccountResponsewire shape.account: null, requiresOpenaiAuth: falsebehavior for other non-OpenAI providers.account/readresponse.Testing
cargo test -p codex-model-providercargo test -p codex-app-server-protocolcargo test -p codex-app-server get_account_with_aws_providerNotes
I attempted
just bazel-lock-updateandjust bazel-lock-check, but both are blocked in my local environment becausebazelis not installed.