remote-code-router is a CLIProxyAPI dynamic-library plugin that exposes a stable virtual model, then lets the server choose the real upstream model.
- Registers virtual models through CPA
ModelRegistrar. - Routes configured virtual model names to this plugin executor.
- Executes the selected real model through CPA
host.model.*callbacks. - Auto-imports CPA
/v1/modelsfrom the management page. - Persists imported candidates and the current selection in
remote-code-router.state.yaml.
Minimal plugin config:
client_models: [code]
active_candidate: auto
model_aliases:
- id: code
display_name: Remote Code Router
context_length: 128000
thinking: true
candidates: []Open Remote Code Router in CPA. The page shows saved candidates first. If none exist, it reads /v1/models, saves the imported candidates once, then shows a compact list for switching.
GET /v0/resource/plugins/remote-code-router/index.htmlGET /v0/resource/plugins/remote-code-router/import.jsonGET /v0/resource/plugins/remote-code-router/select.jsonGET /v0/resource/plugins/remote-code-router/status.json
go test ./...
make build