mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
Added multi-limit support end-to-end by carrying limit_name in rate-limit snapshots and handling multiple buckets instead of only codex. Extended /usage client parsing to consume additional_rate_limits Updated TUI /status and in-memory state to store/render per-limit snapshots Extended app-server rate-limit read response: kept rate_limits and added rate_limits_by_name. Adjusted usage-limit error messaging for non-default codex limit buckets
133 lines
2.5 KiB
JSON
133 lines
2.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"CreditsSnapshot": {
|
|
"properties": {
|
|
"balance": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"hasCredits": {
|
|
"type": "boolean"
|
|
},
|
|
"unlimited": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"hasCredits",
|
|
"unlimited"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"PlanType": {
|
|
"enum": [
|
|
"free",
|
|
"go",
|
|
"plus",
|
|
"pro",
|
|
"team",
|
|
"business",
|
|
"enterprise",
|
|
"edu",
|
|
"unknown"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"RateLimitSnapshot": {
|
|
"properties": {
|
|
"credits": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/CreditsSnapshot"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"limitId": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"limitName": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"planType": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/PlanType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"primary": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/RateLimitWindow"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"secondary": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/RateLimitWindow"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RateLimitWindow": {
|
|
"properties": {
|
|
"resetsAt": {
|
|
"format": "int64",
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"usedPercent": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"windowDurationMins": {
|
|
"format": "int64",
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"usedPercent"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"rateLimits": {
|
|
"$ref": "#/definitions/RateLimitSnapshot"
|
|
}
|
|
},
|
|
"required": [
|
|
"rateLimits"
|
|
],
|
|
"title": "AccountRateLimitsUpdatedNotification",
|
|
"type": "object"
|
|
} |