Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(proxy): add OpenAI Codex account pooling#290

Draft
sozercan wants to merge 1 commit into
mainsozercan/vekil:mainfrom
pool-accsozercan/vekil:pool-accCopy head branch name to clipboard
Draft

feat(proxy): add OpenAI Codex account pooling#290
sozercan wants to merge 1 commit into
mainsozercan/vekil:mainfrom
pool-accsozercan/vekil:pool-accCopy head branch name to clipboard

Conversation

@sozercan

Copy link
Copy Markdown
Owner

Summary

  • add schema-v2 configuration for provider-internal OpenAI Codex account pools
  • add round-robin/fill-first scheduling, model eligibility, cooldowns, half-open probes, and soft session affinity
  • hard-bind Responses state, Chat replay, compaction, and WebSocket sessions to credential generations
  • discover and conservatively merge per-account model catalogs with independent ETags
  • add sanitized account observability, documentation, examples, tests, and a manual live smoke workflow

Validation

  • make test
  • make vet
  • make build
  • focused go test -race ./proxy ... suites for pooling, state binding, replay, WebSocket, compaction, and Chat-over-Responses
  • example config validation, YAML validation, shell syntax validation, and git diff --check

Notes

The credentialed two-account live smoke is intentionally manual and is not part of the credential-free core CI gate.

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copilot AI review requested due to automatic review settings July 23, 2026 21:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.