Skip to content

feat: add codex adapter module with per-key candidate routing#642

Open
Kayphoon wants to merge 1 commit into
fawney19:mainfrom
Kayphoon:codex/codex-adapter
Open

feat: add codex adapter module with per-key candidate routing#642
Kayphoon wants to merge 1 commit into
fawney19:mainfrom
Kayphoon:codex/codex-adapter

Conversation

@Kayphoon

Copy link
Copy Markdown
Contributor

Adds a Codex Adapter module that lets dedicated API keys route requests through a configurable chain of global models with Responses format conversion support.

Backend (Rust)

  • codex_adapter module: config, runtime config, planner, request guard, selection (priority/sticky/load-balance scheduling), compatibility checks
  • Multi-model candidate iteration in candidate_source.py: wraps upstream priority/deferred page pagination inside an outer model loop — each model gets its own priority pass, format scan, and fallback
  • Auth gate: dedicated key guard carrying feature_settings through auth resolution, CodexAdapter rejection variant in ccswitch
  • Admin routes: /api/admin/models/global/codex-adapter-compatibility endpoint, module config validation on system config save
  • State: codex adapter runtime config cache with write invalidation

Frontend (Vue/TS)

  • CodexAdapter admin module page with route candidate table, drag-reorder priority, scheduling mode selection
  • API layer (modules-codex-adapter.ts) and router integration
  • 7 frontend tests

Merge adaptation: Adapted codex adapter's multi-model iteration to work with upstream's new priority-page/deferred-page pagination in candidate_source.rs.

Verification: 584 admin tests, 130 planner tests, 22 codex adapter backend tests, 4 candidate source tests pass. Frontend type-checks and builds cleanly.

@Kayphoon
Kayphoon force-pushed the codex/codex-adapter branch 4 times, most recently from 06a7c41 to 3c99e51 Compare June 16, 2026 17:00
Codex adapter module for Aether that allows dedicated API keys to route
requests through a configurable chain of global models with Responses
format conversion support.

Backend:
- codex_adapter module: config, runtime config, planner, request guard,
  selection (priority/sticky/load-balance scheduling), compatibility checks
- Multi-model iteration in candidate_source.rs: wraps upstream priority/
  deferred page pagination inside an outer model loop, each model gets its
  own priority pass, format scan, and fallback
- Auth gate: dedicated key guard carrying feature_settings through auth
  resolution, CodexAdapter rejection variant in ccswitch
- Admin routes: codex-adapter-compatibility endpoint in global models,
  module config validation on system config save
- State: codex adapter runtime config cache with write invalidation

Frontend:
- CodexAdapter admin module page with route candidate table, drag-reorder
  priority management, scheduling mode selection
- API layer and router integration
@Kayphoon
Kayphoon force-pushed the codex/codex-adapter branch from 3c99e51 to 9dd9f38 Compare June 16, 2026 17:13
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.

1 participant