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:
dand-oai
2026-11-06 22:27:47 +00:00
committed by copyberry
parent 44f1b0e867
commit 01ab354312
21 changed files with 117 additions and 13 deletions
@@ -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):