mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
## 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
177 lines
3.9 KiB
JSON
Generated
177 lines
3.9 KiB
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"Account": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"apiKey"
|
|
],
|
|
"title": "ApiKeyAccountType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "ApiKeyAccount",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"email": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"planType": {
|
|
"$ref": "#/definitions/PlanType"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"chatgpt"
|
|
],
|
|
"title": "ChatgptAccountType",
|
|
"type": "string"
|
|
},
|
|
"workspaceName": {
|
|
"description": "Display name of the selected ChatGPT workspace, when available.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"email",
|
|
"planType",
|
|
"type"
|
|
],
|
|
"title": "ChatgptAccount",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"amazonBedrock"
|
|
],
|
|
"title": "AmazonBedrockAccountType",
|
|
"type": "string"
|
|
},
|
|
"usesCodexManagedCredentials": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "AmazonBedrockAccount",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Google Cloud Vertex AI with externally managed credentials.",
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"gcp"
|
|
],
|
|
"title": "GcpAccountType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "GcpAccount",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"AccountRoutingOverride": {
|
|
"description": "Backend routing policy. Wire values match the accounts/check contract.",
|
|
"enum": [
|
|
"NO_CONSTRAINT",
|
|
"us",
|
|
"us_cr"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"PlanType": {
|
|
"enum": [
|
|
"free",
|
|
"go",
|
|
"plus",
|
|
"pro",
|
|
"prolite",
|
|
"promax",
|
|
"team",
|
|
"self_serve_business_prolite",
|
|
"self_serve_business_usage_based",
|
|
"business",
|
|
"ent26",
|
|
"enterprise_cbp_automation",
|
|
"enterprise_cbp_usage_based",
|
|
"enterprise",
|
|
"edu",
|
|
"edu_plus",
|
|
"edu_pro",
|
|
"sci",
|
|
"sci_plus",
|
|
"unknown"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"WorkspaceRouting": {
|
|
"properties": {
|
|
"accountRoutingOverride": {
|
|
"$ref": "#/definitions/AccountRoutingOverride"
|
|
},
|
|
"backendOrigin": {
|
|
"type": "string"
|
|
},
|
|
"chatgptAccountId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"accountRoutingOverride",
|
|
"backendOrigin",
|
|
"chatgptAccountId"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"account": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/Account"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"requiresOpenaiAuth": {
|
|
"type": "boolean"
|
|
},
|
|
"userId": {
|
|
"default": null,
|
|
"description": "ChatGPT user ID belonging to this account response, when available.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"requiresOpenaiAuth"
|
|
],
|
|
"title": "GetAccountResponse",
|
|
"type": "object"
|
|
} |