I kept re-wiring configs between Codex CLI (Responses API), Claude Code (Anthropic Messages) and Cline/SDKs (Chat Completions), while my model access was scattered across several platforms — each with its own login, quota and credential format. So I wrote a gateway that collapses both layers.
One endpoint, three protocols
Three inbound faces — /v1/chat/completions , /v1/messages (Anthropic), /v1/responses (Codex CLI) — fold into one internal wire, then re-encode into four outbound dialects (openai / anthropic / gemini / responses). Codex CLI, Claude Code and Cline can all point at one local endpoint; switching backends is a one-line model-name change.
Credential pools with auto check-ins
Multi-platform accounts live in one pool: cost-tiered selection (measured, not list price), fast-expiring-credit weighting, 429 exponential backoff, hard cooldown on 402, breaker, and per-conversation stickiness to keep the prompt cache warm.
The part most gateways skip: scheduled housekeeping .…