Treat ChatGPT hc plan as Enterprise#15789
Merged
arnavdugar-openai merged 3 commits intomainfrom Mar 25, 2026
Merged
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
xl-openai
reviewed
Mar 25, 2026
xl-openai
approved these changes
Mar 25, 2026
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Motivation
BusinessorEnterpriseaccounts, but some ID tokens reportchatgpt_plan_type: "hc", which should be treated as an enterprise-equivalent plan.Description
"hc"toKnownPlan::EnterpriseinPlanType::from_raw_valueby treating"enterprise" | "hc"asEnterpriseinlogin/src/token_data.rs.login/src/token_data_tests.rsasserting a JWT withchatgpt_plan_type: "hc"parses asEnterpriseand is considered a workspace account.cloud-requirements/src/lib.rsverifyinghcaccounts are eligible to fetch cloud requirements (treated likeEnterprise).just fmt) after changes.Testing
just fmt(succeeded).cargo test -p codex-login --lib id_token_info_parses_hc_plan_as_enterprise(passed).cargo test -p codex-cloud-requirements --lib fetch_cloud_requirements_allows_hc_plan_as_enterprise(passed) andcargo test -p codex-cloud-requirements(all tests passed).just argument-comment-lint-from-source(required installingcargo-dylint/dylint-linkand the nightly toolchain as part of the run).cargo test -p codex-loginrun showed one unrelated, environment-dependent test failure (auth::default_client::tests::test_create_client_sets_default_headers) that is not caused by these changes; the targetedloginunit added here passes.Codex Task