How we govern pi, a minimal coding agent, without changing it Vidai co-founder and CTO Nagu Gopalakrishnan published @vidaiuk/pi-provider, an Apache 2.0 open-source package that routes every model call from the pi coding agent through a Vidai gateway, where cost, data and regulation rules apply, without modifying pi itself. The provider fetches the model list from the gateway via GET /v1/models, uses each provider's native API format (Anthropic Messages for Claude, Gemini API under /v1beta, OpenAI Responses under /v1, OpenAI Chat Completions for everything else), and requires Vidai 1.0.0-rc.3 or later and pi 1.4 or later. Gopalakrishnan said the gateway is the right place for governance because model calls are where code, prompts and data leave the machine and where the money goes, and pi's own README states it has no built-in permission system for the filesystem, processes, network or credentials. How we govern pi, a minimal coding agent, without changing it. Nagu Gopalakrishnan https://vidaicontrol.com/blog/author/nagu/ · Co-founder and CTO · 5 min read Install @vidaiuk/pi-provider , set two variables, and every model call pi makes goes through your Vidai gateway, where your cost, data and regulation rules apply. That includes local models on your own hardware, not just the hosted ones. pi itself doesn't change. The provider is open source under Apache 2.0, and it's the same setup we use for our own work. Why do we use pi? We use pi for our own development. It's a small, terminal-first coding agent: it reads and edits files in your project, runs commands, and asks a model what to do at each step. It's quick to start, easy to extend, and it doesn't try to decide which model you should use. That last part matters to us, because we don't either. Once we were running it daily, we wanted it under the same rules as every other AI tool in the company. So we wrote a provider, and now we've published it. What does pi leave to you? pi is minimal on purpose. Its own README says it has no built-in permission system for the filesystem, processes, network or credentials, and points you to sandboxing if you need stronger boundaries. That's a sensible split: the harness stays small, and you choose the boundaries. The model calls are the part that leaves your machine, with your code, your prompts and sometimes your data inside them. They're also where the money goes. That makes them the natural place for governance, and the natural place for that is the gateway, not the agent. What does the provider package do? @vidaiuk/pi-provider adds Vidai to pi as a provider. Once it's installed, the models your key is allowed to call appear under Vidai in pi's model picker. The package: - fetches the model list from the gateway GET /v1/models , using your key , including your organisation's aliases. If the gateway can't be reached at start-up, it falls back to a short built-in list; - takes context window, output limit, image input and reasoning settings from pi's own model catalogue, with safe defaults for models it doesn't know; - uses each provider's own API format, chosen from the model name. | Models | Format | Address used | |---|---|---| | Claude | Anthropic Messages | https://