You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codex should sleep/delay upon hitting TPM rate limit, not crash #553
This is not fixed when using 0.1.2505172129 with gpt-4.1, it crashes after several minutes of working with the following message:
[Error]: Rate limit reached for gpt-4.1 in organization org-xxx on tokens per min (TPM): Limit 30000, Used 4828, Requested 25212. Please try again in 80ms. Visit https://platform.openai.com/account/rate-limits to learn more.
at e.a [as iterator] (file:///.../lib/node_modules/@openai/codex/dist/cli.js:582:1514)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async ky.run (file:///.../lib/node_modules/@openai/codex/dist/cli.js:599:2785) {
status: undefined,
headers: undefined,
request_id: undefined,
error: {
type: 'tokens',
code: 'rate_limit_exceeded',
message: 'Rate limit reached for gpt-4.1 in organization org-xxx on tokens per min (TPM): Limit 30000, Used 4828, Requested 25212. Please try again in 80ms. Visit https://platform.openai.com/account/rate-limits to learn more.',
param: null
},
code: 'rate_limit_exceeded',
param: null,
type: 'tokens'
}
Node.js v22.17.0
Activity
tibo-openai commentedon Apr 22, 2025
Should be fixed in latest release, please install 0.1.2504221401 and re-open if this is still an issue you encounter.
vadz commentedon Jul 1, 2025
This is not fixed when using 0.1.2505172129 with gpt-4.1, it crashes after several minutes of working with the following message: