Register a CLIProxyAPI gateway as an OpenAI-compatible model provider in Oh-My-Pi.
CLIProxyAPI is a self-hosted proxy that exposes upstream models (Gemini, Codex,
Claude, Grok — typically via CLI/OAuth accounts) behind the standard OpenAI API
(GET /v1/models, POST /v1/chat/completions, Authorization: Bearer <key>,
default port 8317). This plugin turns that gateway into the cliproxy
provider so its models are usable as cliproxy/<model-id> anywhere in OMP.
bash plugins/cliproxy/install.sh
# pwsh -File plugins/cliproxy/install.ps1 # Windows
# non-interactive:
bash plugins/cliproxy/install.sh --url=http://localhost:8317 --api-key=YOURKEYWhat it does:
- Prompts for the gateway URL and API key (or reads
--url/--api-key, orCLIPROXY_URL/CLIPROXY_API_KEY). - Lists the gateway's models (
GET <url>/v1/models) to confirm it works. - Writes a
cliproxyprovider into~/.omp/agent/models.ymlwithdiscovery: openai-models-list, so the model list stays current at runtime. - Stores the key in
~/.omp/cliproxy.key(chmod 600), referenced frommodels.ymlviaapiKey: "!cat …"— never written inline. - Loads the provider extension so
/cliproxyre-lists models on demand.
# ~/.omp/agent/config.yml
modelRoles:
default: cliproxy/gemini-2.5-flash
smol: cliproxy/gpt-5-mini/cliproxy re-lists the gateway's models and re-registers the provider live.
- The base URL is normalised to end in
/v1(sohttp://host:8317works). - Re-running preserves an existing
cliproxyprovider block — delete it frommodels.ymlto regenerate.