This is the prompt I currently use to add my self-hosted server APIs to any new installation of Pi on a client machine. It queries each of the servers for available models, and then generates a prompt to run on other client machines, so the whole query process can be skipped:
Please add to pi all the models from the lm studio and ds4 providers at https://mysubdomain1.mydomain.com https://mysubdomain1ds4.mydomain.com https://mysubdomain2.mydomain.com https://mysubdomain2ds4.mydomain.com https://mysubdomain3.mydomain.com https://mysubdomain3ds4.mydomain.com
When this is complete, please provide a copy paste prompt that enables other installations of Pi to add all these models, without having to query those providers for the available models.
At this point, I make more than 100 total LLM models available on 8 locally hosted servers, using this routine. They're all instantly selectable in every installation of Pi, on every one of dozens of client machines I use at different locations (including my Android phone), just by entering the Pi /model command. Those locally hosted provider endpoints work just like a connection to Openrouter, Deepseek, or any other LLM API provider, so they can be used in any other local agent/harness application (Codex, OpenCode, etc.). Multiple client machines can connect to the local server inference engines I have set up on each of those endpoints, to process incoming simultaneous API requests, up to the limit that each machine's hardware can handle.
None of this massive server configuration requires anything more than downloading the tiny Cloudflared app on each server, and setting up routes at https://dash.cloudflare.com - you just need to purchase a single domain from Cloudflare.