Serve every model through one unified proxy endpoint - #8
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 whileGPT models are translated to the OpenAI surface — one base URL, one
/v1/modelslisting everything.Why
/model <name>can switch to any model mid-session, GPT included — thegap this closes is "GPT is a launch-time-only choice".
/modelpicker UI also lists them is underinvestigation (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)
proxy configured: all 12 models on one endpoint/v1/modelsAll 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).