Skip to content

Serve every model through one unified proxy endpoint - #8

Merged
BeLazy167 merged 1 commit into
mainfrom
feat/unified-proxy
Aug 21, 2026
Merged

Serve every model through one unified proxy endpoint#8
BeLazy167 merged 1 commit into
mainfrom
feat/unified-proxy

Conversation

@BeLazy167

Copy link
Copy Markdown
Member

Follow-up to #7, replacing split routing with one endpoint for all 12 models.

CLIProxyAPI supports Anthropic-style upstreams with a custom base-url
(claude-api-key), so Claude models now pass through it untouched while
GPT models are translated to the OpenAI surface — one base URL, one
/v1/models listing everything.

Why

  • /model <name> can switch to any model mid-session, GPT included — the
    gap this closes is "GPT is a launch-time-only choice".
  • The launcher loses its dual-path routing.
  • Whether Claude Code's /model picker UI also lists them is under
    investigation (background research on the binary's picker source); switching
    by name works regardless because the model id is just a per-request string
    the unified endpoint now resolves.

Safety

The proxy is never load-bearing for Claude models: missing binary or failed
start → direct gateway fallback with a one-line notice. GPT models without the
proxy exit with the fix. Exercised in the live test by removing the config.

Verified live (fresh delete + reinstall)

install proxy configured: all 12 models on one endpoint
claude via proxy (passthrough)
gpt via same proxy (translated)
proxy /v1/models 12 models
fallback (config removed) claude answers direct, with notice

All suites green: shellcheck ×6, statusline 12/12, extractors 5/5,
model-routing 6/6, bash 3.2 parse. Windows scripts updated equivalently —
CI-parsed, not executed (standing gap).

Instead of routing Claude models direct and only GPT through the proxy, the
proxy now fronts all 12 models on one base URL: claude-api-key passthrough
(Anthropic wire untouched) for Claude, OpenAI-surface translation for GPT.
One endpoint means /v1/models lists everything and `/model <name>` can switch
to any model mid-session, GPT included.

Claude models cannot break because of this: when the proxy is missing or
fails to start, the launcher falls back to the gateway directly and says so;
GPT models state their requirement and exit.

Verified live on a fresh reinstall: claude + gpt through the same endpoint,
12 models listed, fallback exercised with the config removed.
@BeLazy167
BeLazy167 merged commit bab94b0 into main Aug 21, 2026
6 checks passed
@BeLazy167
BeLazy167 deleted the feat/unified-proxy branch August 21, 2026 00:12
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