mirror of
https://github.com/openai/codex.git
synced 2026-04-25 07:05:38 +00:00
This change fixes a Codex app account-state sync bug where clients could know the user was signed in but still miss the ChatGPT subscription tier, which could lead to incorrect upgrade messaging for paid users. The root cause was that `account/updated` only carried `authMode` while plan information was available separately via `account/read` and rate-limit snapshots, so this update adds `planType` to `account/updated`, populates it consistently across login and refresh paths.
69 lines
1.5 KiB
JSON
69 lines
1.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"AuthMode": {
|
|
"description": "Authentication mode for OpenAI-backed providers.",
|
|
"oneOf": [
|
|
{
|
|
"description": "OpenAI API key provided by the caller and stored by Codex.",
|
|
"enum": [
|
|
"apikey"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"description": "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
|
|
"enum": [
|
|
"chatgpt"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"description": "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
|
|
"enum": [
|
|
"chatgptAuthTokens"
|
|
],
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"PlanType": {
|
|
"enum": [
|
|
"free",
|
|
"go",
|
|
"plus",
|
|
"pro",
|
|
"team",
|
|
"business",
|
|
"enterprise",
|
|
"edu",
|
|
"unknown"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"properties": {
|
|
"authMode": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/AuthMode"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"planType": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/PlanType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"title": "AccountUpdatedNotification",
|
|
"type": "object"
|
|
} |