Repository navigation
feat: OpenAI API key pools and monthly recovery (v0.30.60) - #1011
Merged
Merged
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenAI Chat and Responses providers can now share an encrypted API key pool. Independent requests rotate evenly across eligible accounts; explicit quota errors pause the affected account while other accounts continue serving. Providers includes account import, replacement, model restrictions, pause/recovery controls, strategy selection, and gateway-observed usage.
Quota recovery uses the first eligible business request after the monthly boundary (Asia/Shanghai by default), with an atomic reservation shared across instances. A successful request confirms recovery; unsuccessful recovery waits at least 24 hours. Invalid credentials require replacement. Streaming output and stateful continuations retain the existing no-replay and credential-isolation boundaries, including a fresh model-permission check before sending.
Credentials and lifecycle state reuse the encrypted single-row config store with SQLite/Postgres compare-and-set, without migrations. Existing environment credentials remain available until the pool is first configured; an emptied pool cannot silently reactivate them. Admin keys and balance queries are excluded. Rotation fairness is per gateway/protocol pool, and displayed costs are estimates for Helm traffic.
Validation:
pnpm typecheck,pnpm lint,pnpm build, and admin Svelte diagnostics passed (lint retains existing warnings).Release preparation:
pnpm release:prepare 0.30.60confirmed the latest stable snapshots (Grok 1.0.70, Claude Code 2.1.312, Codex 0.165.0 and its tagged catalog); no snapshot changes were needed. All seven admin locales are now aligned, fixing the first full-CI failure. The i18n and release-preparation suites pass (25 tests).