Conversation
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds provider-internal OpenAI Codex account pooling with scheduling, credential-bound state, discovery, observability, and live validation.
Changes:
- Adds configurable account pools with affinity, failover, cooldowns, and model eligibility.
- Binds continuation state and replay sessions to credential generations.
- Adds documentation, tests, telemetry, examples, and a manual smoke workflow.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/live-codex-pool-smoke.yaml |
Adds manual two-account smoke workflow. |
CLAUDE.md |
Updates architecture guidance. |
README.md |
Links account-pool documentation. |
docs/architecture.md |
Documents pooled execution ownership. |
docs/dashboard.md |
Documents account telemetry. |
docs/development.md |
Adds pool test and smoke guidance. |
docs/provider-routing.md |
Documents pool configuration and behavior. |
docs/responses.md |
Documents credential-bound state. |
examples/openai-codex-account-pool.yaml |
Adds example pool configuration. |
scripts/live-codex-pool-smoke.sh |
Exercises round-robin account selection. |
proxy/chat_handlers.go |
Integrates credential-aware Chat replay. |
proxy/chat_over_responses_request.go |
Propagates resolved replay ownership. |
proxy/gemini_handler.go |
Supports managed catalog routes. |
proxy/handler.go |
Adds pooled-provider readiness checks. |
proxy/handler_test.go |
Updates Codex pool test setup. |
proxy/model_routes.go |
Enables managed pooled catalog routes. |
proxy/model_routes_config.go |
Adds and validates pool configuration. |
proxy/model_routes_config_test.go |
Tests schema and pool validation. |
proxy/openai_codex_account_pool.go |
Implements pooling and discovery. |
proxy/openai_codex_account_pool_test.go |
Tests scheduler and ownership behavior. |
proxy/openai_codex_auth.go |
Supports explicit auth files and identity metadata. |
proxy/openai_codex_auth_test.go |
Tests explicit auth paths. |
proxy/providers.go |
Integrates pools into provider runtime. |
proxy/providers_config_test.go |
Tests JSON/YAML pool loading. |
proxy/request_summary.go |
Records account-level outcomes. |
proxy/response_model_normalization.go |
Carries credential ownership metadata. |
proxy/responses_chat_replay.go |
Binds replay groups to credentials. |
proxy/responses_chat_replay_test.go |
Tests replay credential isolation. |
proxy/responses_handler.go |
Adds affinity header and managed routing support. |
proxy/responses_websocket.go |
Pins WebSocket sessions to credentials. |
proxy/route_executor.go |
Implements account selection and failover execution. |
proxy/route_state_binding.go |
Binds state to complete execution owners. |
proxy/state_binding.go |
Extends ownership with credential IDs. |
proxy/state_binding_test.go |
Tests cross-credential conflicts. |
proxy/stats.go |
Adds account-pool telemetry. |
proxy/upstream_http.go |
Routes pooled catalogs through managed execution. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 36/36 changed files
- Comments generated: 2
- Review effort level: Medium
| "OpenAI-Beta", | ||
| "session_id", | ||
| "session-id", | ||
| "X-Session-ID", |
Comment on lines
+100
to
+105
| for item in payload.get('data', []): | ||
| model = item.get('id', '') | ||
| endpoints = item.get('supported_endpoints') or [] | ||
| if model and '/responses' in endpoints: | ||
| print(model) | ||
| break |
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.
Summary
Validation
make testmake vetmake buildgo test -race ./proxy ...suites for pooling, state binding, replay, WebSocket, compaction, and Chat-over-Responsesgit diff --checkNotes
The credentialed two-account live smoke is intentionally manual and is not part of the credential-free core CI gate.