Menu

1 / 2

StarPort: one local endpoint for Claude Code, Codex CLI and Cline — with credential pools and auto check-ins

DEV Community: go·RisingInsight·8 days ago
#Nb70gTZy
#devtogo#devto#dev#codex#responses
Reading 0:00
15s threshold

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 .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.