diff --git a/codex-rs/app-server-client/src/lib.rs b/codex-rs/app-server-client/src/lib.rs index 14dbcbea0b..9dec04079a 100644 --- a/codex-rs/app-server-client/src/lib.rs +++ b/codex-rs/app-server-client/src/lib.rs @@ -1834,6 +1834,7 @@ mod tests { serde_json::from_value( serde_json::to_value(ServerNotification::AccountUpdated( AccountUpdatedNotification { + reason: None, auth_mode: None, plan_type: None, }, diff --git a/codex-rs/app-server-client/src/remote.rs b/codex-rs/app-server-client/src/remote.rs index c6ac801872..5321c0600a 100644 --- a/codex-rs/app-server-client/src/remote.rs +++ b/codex-rs/app-server-client/src/remote.rs @@ -1082,6 +1082,7 @@ mod tests { &event_tx, AppServerEvent::ServerNotification(Box::new(ServerNotification::AccountUpdated( codex_app_server_protocol::AccountUpdatedNotification { + reason: None, auth_mode: None, plan_type: None, }, diff --git a/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/codex-rs/app-server-protocol/schema/json/ServerNotification.json index 3ac1aca0c0..13d54d4b04 100644 --- a/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -50,6 +50,13 @@ ], "type": "object" }, + "AccountUpdateReason": { + "enum": [ + "workspaceRoutingReady", + "unknown" + ], + "type": "string" + }, "AccountUpdatedNotification": { "properties": { "authMode": { @@ -71,6 +78,17 @@ "type": "null" } ] + }, + "reason": { + "anyOf": [ + { + "$ref": "#/definitions/AccountUpdateReason" + }, + { + "type": "null" + } + ], + "description": "Set when initial routing discovery completes for the same authenticated owner." } }, "type": "object" diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index a01696669d..a1803b3c15 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -7285,6 +7285,13 @@ }, "type": "object" }, + "AccountUpdateReason": { + "enum": [ + "workspaceRoutingReady", + "unknown" + ], + "type": "string" + }, "AccountUpdatedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { @@ -7307,6 +7314,17 @@ "type": "null" } ] + }, + "reason": { + "anyOf": [ + { + "$ref": "#/definitions/v2/AccountUpdateReason" + }, + { + "type": "null" + } + ], + "description": "Set when initial routing discovery completes for the same authenticated owner." } }, "title": "AccountUpdatedNotification", diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 4d6ff87137..5bba601bf0 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -349,6 +349,13 @@ }, "type": "object" }, + "AccountUpdateReason": { + "enum": [ + "workspaceRoutingReady", + "unknown" + ], + "type": "string" + }, "AccountUpdatedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { @@ -371,6 +378,17 @@ "type": "null" } ] + }, + "reason": { + "anyOf": [ + { + "$ref": "#/definitions/AccountUpdateReason" + }, + { + "type": "null" + } + ], + "description": "Set when initial routing discovery completes for the same authenticated owner." } }, "title": "AccountUpdatedNotification", diff --git a/codex-rs/app-server-protocol/schema/json/v2/AccountUpdatedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/AccountUpdatedNotification.json index 00b5bdf8de..701ac842f3 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/AccountUpdatedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/AccountUpdatedNotification.json @@ -1,6 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { + "AccountUpdateReason": { + "enum": [ + "workspaceRoutingReady", + "unknown" + ], + "type": "string" + }, "AuthMode": { "description": "Authentication mode for OpenAI-backed providers.", "oneOf": [ @@ -108,6 +115,17 @@ "type": "null" } ] + }, + "reason": { + "anyOf": [ + { + "$ref": "#/definitions/AccountUpdateReason" + }, + { + "type": "null" + } + ], + "description": "Set when initial routing discovery completes for the same authenticated owner." } }, "title": "AccountUpdatedNotification", diff --git a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst index 82053102aa..62f8b95e59 100644 Binary files a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst and b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst differ diff --git a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst index 5a275c040c..989ef92d30 100644 Binary files a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst and b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst differ diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountUpdateReason.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountUpdateReason.ts new file mode 100644 index 0000000000..7136522a5c --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/AccountUpdateReason.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type AccountUpdateReason = "workspaceRoutingReady" | "unknown"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AccountUpdatedNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AccountUpdatedNotification.ts index 84bf626e0d..08c91e71b7 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AccountUpdatedNotification.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/AccountUpdatedNotification.ts @@ -3,5 +3,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AuthMode } from "../AuthMode"; import type { PlanType } from "../PlanType"; +import type { AccountUpdateReason } from "./AccountUpdateReason"; -export type AccountUpdatedNotification = { authMode: AuthMode | null, planType: PlanType | null, }; +export type AccountUpdatedNotification = { authMode: AuthMode | null, planType: PlanType | null, +/** + * Set when initial routing discovery completes for the same authenticated owner. + */ +reason: AccountUpdateReason | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts index 211a4b0121..b0f9bc947b 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -11,6 +11,7 @@ export type { AccountSessionWorkspace } from "./AccountSessionWorkspace"; export type { AccountSessionWorkspaceKind } from "./AccountSessionWorkspaceKind"; export type { AccountTokenUsageDailyBucket } from "./AccountTokenUsageDailyBucket"; export type { AccountTokenUsageSummary } from "./AccountTokenUsageSummary"; +export type { AccountUpdateReason } from "./AccountUpdateReason"; export type { AccountUpdatedNotification } from "./AccountUpdatedNotification"; export type { ActivePermissionProfile } from "./ActivePermissionProfile"; export type { AddCreditsNudgeCreditType } from "./AddCreditsNudgeCreditType"; diff --git a/codex-rs/app-server-protocol/src/protocol/v2/account.rs b/codex-rs/app-server-protocol/src/protocol/v2/account.rs index da570d48e2..9d675411f1 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2/account.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2/account.rs @@ -621,6 +621,17 @@ pub enum AccountRoutingOverride { pub struct AccountUpdatedNotification { pub auth_mode: Option, pub plan_type: Option, + /// Set when initial routing discovery completes for the same authenticated owner. + pub reason: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/", rename_all = "camelCase")] +pub enum AccountUpdateReason { + WorkspaceRoutingReady, + #[serde(other)] + Unknown, } #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] diff --git a/codex-rs/app-server/README.md b/codex-rs/app-server/README.md index 68657964e9..5c8f4a47a9 100644 --- a/codex-rs/app-server/README.md +++ b/codex-rs/app-server/README.md @@ -629,7 +629,7 @@ PAT sessions continue to return no bearer token from `getAuthStatus`. The experimental `account/read.workspaceRouting` response field returns the selected ChatGPT workspace's `chatgptAccountId`, resolved HTTPS `backendOrigin`, and backend-provided `accountRoutingOverride`. The routing value is `us`, `us_cr`, or the explicit `NO_CONSTRAINT` value. API-only and signed-out accounts return `null` and do not need `accounts/check`. -App-server discovers routing for saved ChatGPT logins at startup and for new logins or workspace switches. After requirements and routing are ready, it sends the existing `account/updated` notification. Newly initialized connections also receive this notification once saved-workspace routing is ready, including when discovery finished before the connection initialized. Clients then reread `configRequirements/read` and `account/read`. Saved ChatGPT credentials without a selected workspace ID retain their account information and return `workspaceRouting: null`; app-server does not guess a workspace from the backend's default account. Discovery failures for a selected workspace, including missing or null fields from older backends, return an `account/read` error. They never produce a successful unrestricted result. A later read retries failed discovery. Logout clears the cached routing, and results from earlier authentication owners are discarded. Token refreshes for the same known user and workspace invalidate cached routing without cancelling discovery or failing sign-in. Configuration is reloaded after discovery; a changed backend, model provider, or required backend rejects the result so the next read discovers against current configuration. Account notifications recheck the auth owner generation after waiting for outbound queue capacity. Superseded sign-in attempts emit a failed `account/login/completed` event instead of silently dropping completion. Notifications remain snapshots: clients reread current account and requirements state rather than treating a queued notification as authorization. +App-server discovers routing for saved ChatGPT logins at startup and for new logins or workspace switches. After requirements and routing are ready, it sends the existing `account/updated` notification. Newly initialized connections also receive this notification once saved-workspace routing is ready, including when discovery finished before the connection initialized. This initial notification carries `reason: "workspaceRoutingReady"` when the authenticated owner generation is unchanged. Login, logout, and workspace-switch notifications include `reason: null`. Clients then reread `configRequirements/read` and `account/read`. Saved ChatGPT credentials without a selected workspace ID retain their account information and return `workspaceRouting: null`; app-server does not guess a workspace from the backend's default account. Discovery failures for a selected workspace, including missing or null fields from older backends, return an `account/read` error. They never produce a successful unrestricted result. A later read retries failed discovery. Logout clears the cached routing, and results from earlier authentication owners are discarded. Token refreshes for the same known user and workspace invalidate cached routing without cancelling discovery or failing sign-in. Configuration is reloaded after discovery; a changed backend, model provider, or required backend rejects the result so the next read discovers against current configuration. Account notifications recheck the auth owner generation after waiting for outbound queue capacity. Superseded sign-in attempts emit a failed `account/login/completed` event instead of silently dropping completion. Notifications remain snapshots: clients reread current account and requirements state rather than treating a queued notification as authorization. Routing compares origins by scheme, host, and effective port, ignoring API paths. A required `chatgpt_base_url` must match discovery; if neither provides an origin, `NO_CONSTRAINT` uses the diff --git a/codex-rs/app-server/src/account_notifications_tests.rs b/codex-rs/app-server/src/account_notifications_tests.rs index df55eaa451..d6a48fc6e9 100644 --- a/codex-rs/app-server/src/account_notifications_tests.rs +++ b/codex-rs/app-server/src/account_notifications_tests.rs @@ -17,6 +17,7 @@ async fn queued_notifications_follow_auth_owner_changes(owner_generation: u64) { ); let (changes, auth_changes) = watch::channel(AuthChangeState::default()); let updated = AccountUpdatedNotification { + reason: None, auth_mode: None, plan_type: None, }; diff --git a/codex-rs/app-server/src/outgoing_message.rs b/codex-rs/app-server/src/outgoing_message.rs index c4cbce370d..25b94661d2 100644 --- a/codex-rs/app-server/src/outgoing_message.rs +++ b/codex-rs/app-server/src/outgoing_message.rs @@ -1250,6 +1250,7 @@ mod tests { #[test] fn verify_account_updated_notification_serialization() { let notification = ServerNotification::AccountUpdated(AccountUpdatedNotification { + reason: None, auth_mode: Some(AuthMode::Chatgpt), plan_type: Some(PlanType::SelfServeBusinessProLite), }); @@ -1259,7 +1260,8 @@ mod tests { "method": "account/updated", "params": { "authMode": "chatgpt", - "planType": "self_serve_business_prolite" + "planType": "self_serve_business_prolite", + "reason": null }, }), serde_json::to_value(notification) diff --git a/codex-rs/app-server/src/request_processors/account_processor.rs b/codex-rs/app-server/src/request_processors/account_processor.rs index 92fb152787..3ce6198e30 100644 --- a/codex-rs/app-server/src/request_processors/account_processor.rs +++ b/codex-rs/app-server/src/request_processors/account_processor.rs @@ -258,6 +258,7 @@ impl AccountRequestProcessor { fn current_account_updated_notification(&self) -> AccountUpdatedNotification { let auth = self.auth_manager.auth_cached(); AccountUpdatedNotification { + reason: None, auth_mode: auth .as_ref() .map(CodexAuth::api_auth_mode) @@ -1084,6 +1085,7 @@ impl AccountRequestProcessor { .ok() .cloned() .map(|auth_mode| AccountUpdatedNotification { + reason: None, auth_mode, plan_type: None, }); diff --git a/codex-rs/app-server/src/request_processors/account_processor/workspace_routing.rs b/codex-rs/app-server/src/request_processors/account_processor/workspace_routing.rs index f0bcef3a79..8a8b3e0886 100644 --- a/codex-rs/app-server/src/request_processors/account_processor/workspace_routing.rs +++ b/codex-rs/app-server/src/request_processors/account_processor/workspace_routing.rs @@ -5,6 +5,7 @@ use super::*; use codex_app_server_protocol::AccountRoutingOverride; +use codex_app_server_protocol::AccountUpdateReason; use codex_backend_client::AccountEntry; use codex_config::ConfigLoadError; use codex_http_client::NetworkPolicyDenied; @@ -244,7 +245,8 @@ impl AccountRequestProcessor { && response.workspace_routing.is_some() && auth_changes.borrow().owner_generation == owner_generation { - let notification = processor.current_account_updated_notification(); + let mut notification = processor.current_account_updated_notification(); + notification.reason = Some(AccountUpdateReason::WorkspaceRoutingReady); processor .outgoing .send_account_notification( diff --git a/codex-rs/app-server/tests/suite/v2/account.rs b/codex-rs/app-server/tests/suite/v2/account.rs index 3f4d2836f6..64667017d3 100644 --- a/codex-rs/app-server/tests/suite/v2/account.rs +++ b/codex-rs/app-server/tests/suite/v2/account.rs @@ -234,6 +234,7 @@ async fn assert_account_updated( assert_eq!( payload, AccountUpdatedNotification { + reason: None, auth_mode, plan_type: None, } @@ -2620,6 +2621,7 @@ async fn login_survives_same_owner_token_refresh( assert_eq!( updated, AccountUpdatedNotification { + reason: None, auth_mode: Some(AuthMode::Chatgpt), plan_type: Some(AccountPlanType::Enterprise), } diff --git a/codex-rs/app-server/tests/suite/v2/account_enterprise_tests.rs b/codex-rs/app-server/tests/suite/v2/account_enterprise_tests.rs index 994bf5c39d..2068aac2ea 100644 --- a/codex-rs/app-server/tests/suite/v2/account_enterprise_tests.rs +++ b/codex-rs/app-server/tests/suite/v2/account_enterprise_tests.rs @@ -150,6 +150,7 @@ client_id = "enterprise-client""# assert_eq!( account, AccountUpdatedNotification { + reason: None, auth_mode: None, plan_type: None, } diff --git a/codex-rs/app-server/tests/suite/v2/account_workspace_switching.rs b/codex-rs/app-server/tests/suite/v2/account_workspace_switching.rs index 78d9a56230..7358534077 100644 --- a/codex-rs/app-server/tests/suite/v2/account_workspace_switching.rs +++ b/codex-rs/app-server/tests/suite/v2/account_workspace_switching.rs @@ -383,6 +383,7 @@ async fn workspace_switch_validates_and_preserves_managed_login( notification.params.expect("account/updated params") )?, AccountUpdatedNotification { + reason: None, auth_mode: Some(AuthMode::Chatgpt), plan_type: Some(AccountPlanType::Business), } diff --git a/codex-rs/app-server/tests/suite/v2/workspace_routing.rs b/codex-rs/app-server/tests/suite/v2/workspace_routing.rs index e921be65b4..3d1fbef19a 100644 --- a/codex-rs/app-server/tests/suite/v2/workspace_routing.rs +++ b/codex-rs/app-server/tests/suite/v2/workspace_routing.rs @@ -155,7 +155,9 @@ async fn saved_workspace_is_discovered_once_and_not_the_default_account( .await??; assert_eq!( notification.params, - Some(json!({"authMode": "chatgpt", "planType": plan_type})) + Some( + json!({"authMode": "chatgpt", "planType": plan_type, "reason": "workspaceRoutingReady"}) + ) ); let expected = json!({ "account": {"type": "chatgpt", "email": "user@example.com", "planType": plan_type, "workspaceName": "Selected workspace"}, @@ -345,7 +347,9 @@ async fn login_and_workspace_switch_notify_after_routing_is_ready_then_logout_cl .await??; assert_eq!( notification.params, - Some(json!({"authMode": "chatgptAuthTokens", "planType": "enterprise"})) + Some( + json!({"authMode": "chatgptAuthTokens", "planType": "enterprise", "reason": null}) + ) ); assert_eq!( read(&mut server).await?["workspaceRouting"], @@ -362,6 +366,15 @@ async fn login_and_workspace_switch_notify_after_routing_is_ready_then_logout_cl } let request = server.send_logout_account_request().await?; let _: LogoutAccountResponse = timeout(READ_TIMEOUT, server.read_response(request)).await??; + let notification = timeout( + READ_TIMEOUT, + server.read_stream_until_notification_message("account/updated"), + ) + .await??; + assert_eq!( + notification.params, + Some(json!({"authMode": null, "planType": null, "reason": null})) + ); assert_eq!( read(&mut server).await?, json!({"account": null, "userId": null, "requiresOpenaiAuth": true, "workspaceRouting": null}) diff --git a/codex-rs/tui/src/app/agents_overview_usage_tests.rs b/codex-rs/tui/src/app/agents_overview_usage_tests.rs index 6a601bf62d..e797126460 100644 --- a/codex-rs/tui/src/app/agents_overview_usage_tests.rs +++ b/codex-rs/tui/src/app/agents_overview_usage_tests.rs @@ -219,6 +219,7 @@ async fn selected_usage_is_cached_and_account_changes_discard_old_results() -> R AppServerEvent::Lagged { skipped: 1 }, AppServerEvent::ServerNotification(Box::new(ServerNotification::AccountUpdated( AccountUpdatedNotification { + reason: None, auth_mode: None, plan_type: None, }, diff --git a/codex-rs/tui/src/app/tests/backend_banner_recovery_tests.rs b/codex-rs/tui/src/app/tests/backend_banner_recovery_tests.rs index 5012e607ed..fd6112680b 100644 --- a/codex-rs/tui/src/app/tests/backend_banner_recovery_tests.rs +++ b/codex-rs/tui/src/app/tests/backend_banner_recovery_tests.rs @@ -435,6 +435,7 @@ async fn backend_banner_account_changes_invalidate_pending_recovery() -> Result< codex_app_server_client::AppServerEvent::ServerNotification(Box::new( ServerNotification::AccountUpdated( codex_app_server_protocol::AccountUpdatedNotification { + reason: None, auth_mode: None, plan_type: None, }, diff --git a/codex-rs/tui/src/app/tests/backend_event_tests.rs b/codex-rs/tui/src/app/tests/backend_event_tests.rs index cbe0c37594..c6f235613c 100644 --- a/codex-rs/tui/src/app/tests/backend_event_tests.rs +++ b/codex-rs/tui/src/app/tests/backend_event_tests.rs @@ -172,6 +172,7 @@ async fn foreign_backend_events_leave_thread_cache_and_connection_untouched() -> }, AppServerEvent::ServerNotification(Box::new(ServerNotification::AccountUpdated( AccountUpdatedNotification { + reason: None, auth_mode: None, plan_type: None, }, diff --git a/codex-rs/tui/src/app/tests/new_session_tests.rs b/codex-rs/tui/src/app/tests/new_session_tests.rs index 91966ab677..4ad08e8c2a 100644 --- a/codex-rs/tui/src/app/tests/new_session_tests.rs +++ b/codex-rs/tui/src/app/tests/new_session_tests.rs @@ -74,6 +74,7 @@ async fn new_session_refreshes_account_for_the_started_provider() -> Result<()> codex_app_server_client::AppServerEvent::ServerNotification(Box::new( ServerNotification::AccountUpdated( codex_app_server_protocol::AccountUpdatedNotification { + reason: None, auth_mode: Some(codex_app_server_protocol::AuthMode::Chatgpt), plan_type: Some(codex_protocol::account::PlanType::Pro), }, diff --git a/codex-rs/tui/src/app/tests/security_setup_tests.rs b/codex-rs/tui/src/app/tests/security_setup_tests.rs index c9a174b014..54baec8719 100644 --- a/codex-rs/tui/src/app/tests/security_setup_tests.rs +++ b/codex-rs/tui/src/app/tests/security_setup_tests.rs @@ -113,6 +113,7 @@ async fn security_setup_fetch_with_default_features_uses_authenticated_codex_end &server, AppServerEvent::ServerNotification(Box::new(ServerNotification::AccountUpdated( AccountUpdatedNotification { + reason: None, auth_mode: Some(AuthMode::Chatgpt), plan_type: None, }, diff --git a/codex-rs/tui/src/app/tests/thread_usage.rs b/codex-rs/tui/src/app/tests/thread_usage.rs index 2eb7b7c058..8a6e1edd59 100644 --- a/codex-rs/tui/src/app/tests/thread_usage.rs +++ b/codex-rs/tui/src/app/tests/thread_usage.rs @@ -95,6 +95,7 @@ async fn account_updated_with_backend_only_auth_enables_thread_usage() -> Result &app_server, AppServerEvent::ServerNotification(Box::new(ServerNotification::AccountUpdated( AccountUpdatedNotification { + reason: None, auth_mode: Some(AuthMode::AgentIdentity), plan_type: Some(PlanType::Business), }, @@ -254,6 +255,7 @@ async fn account_change_discards_thread_usage_deferred_while_overlay_is_open() - &app_server, AppServerEvent::ServerNotification(Box::new(ServerNotification::AccountUpdated( AccountUpdatedNotification { + reason: None, auth_mode: Some(AuthMode::AgentIdentity), plan_type: Some(PlanType::Business), }, diff --git a/sdk/python/src/openai_codex/generated/v2_all.py b/sdk/python/src/openai_codex/generated/v2_all.py index e667ac7239..08f0986734 100644 --- a/sdk/python/src/openai_codex/generated/v2_all.py +++ b/sdk/python/src/openai_codex/generated/v2_all.py @@ -95,6 +95,11 @@ class AccountTokenUsageSummary(BaseModel): peak_daily_tokens: Annotated[int | None, Field(alias="peakDailyTokens")] = None +class AccountUpdateReason(Enum): + workspace_routing_ready = "workspaceRoutingReady" + unknown = "unknown" + + class ActivePermissionProfile(BaseModel): model_config = ConfigDict( populate_by_name=True, @@ -7479,6 +7484,12 @@ class AccountUpdatedNotification(BaseModel): ) auth_mode: Annotated[AuthMode | None, Field(alias="authMode")] = None plan_type: Annotated[PlanType | None, Field(alias="planType")] = None + reason: Annotated[ + AccountUpdateReason | None, + Field( + description="Set when initial routing discovery completes for the same authenticated owner." + ), + ] = None class AdditionalContextEntry(BaseModel):