mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
Expose ChatGPT user IDs in account/read responses (#60004)
## What changed Add a nullable `userId` to `GetAccountResponse`, populated from the same authenticated account snapshot as the rest of the response. ChatGPT and personal access token sessions return the canonical ChatGPT user ID when available; API-only and signed-out sessions return `null`. Update the cloud client, generated schemas, TypeScript and Python types, and account identity documentation. Default missing IDs to `None` when deserializing responses from older app servers. ## Testing Extend account response tests to check ChatGPT and personal access token user IDs, null IDs for other providers and signed-out sessions, and ID changes when switching providers with saved ChatGPT credentials. GitOrigin-RevId: 7ad3da3cfc835c4d08d03c8e91b06cd7e007d874
This commit is contained in:
@@ -8923,6 +8923,13 @@ class GetAccountResponse(BaseModel):
|
||||
)
|
||||
account: Account | None = None
|
||||
requires_openai_auth: Annotated[bool, Field(alias="requiresOpenaiAuth")]
|
||||
user_id: Annotated[
|
||||
str | None,
|
||||
Field(
|
||||
alias="userId",
|
||||
description="ChatGPT user ID belonging to this account response, when available.",
|
||||
),
|
||||
] = None
|
||||
|
||||
|
||||
class GuardianApprovalReview(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user