
On this page
Before you start Write the setup file Know what the file may carry Try it on your own account first Publish it What a member sees Change the file laterA lab or site that runs its own model gateway can connect every member's PanCode with one small YAML file. You publish it once; each member imports it, sees where their prompts will go, and confirms. The file can name models and where to find a key, but it can never carry a key or change what PanCode is allowed to do.
Before you start
- An OpenAI-compatible model gateway your members can reach, here
https://llm.lab.example.org/v1. - A way to give each member a key, which they keep in an environment variable.
- An
httpsaddress or a shared path where you can publish the file.
Write the setup file
lab-pancode.yaml
notes: "Lab gateway. Ask #research-computing for a key; export it as LAB_API_KEY."
connections:
- id: lab
runtime: openai-compat
url: https://llm.lab.example.org/v1
defaultModel: gpt-oss-120b
capabilities: { contextWindow: 131072 }
auth: { apiKeyEnvVar: LAB_API_KEY }
chat: { connection: lab }
fleet: { connection: lab, model: gpt-oss-120b }connections lists the model endpoints. chat and fleet choose which connection the main session and its workers use. notes is shown to the member before they confirm, so use it to say how to get a key.
Know what the file may carry
A setup file may hold only connections, chat, fleet and notes. A connection may hold only id, runtime, url, defaultModel, wireModels, capabilities, pricing and auth, and auth only names an environment variable (apiKeyEnvVar) or an OAuth profile. Anything else refuses the whole file. A literal key is the usual mistake:
bad.yaml
connections:
- id: lab2
runtime: openai-compat
url: https://x/v1
auth: { apiKey: sk-123 }What you should see
error: setup file refused; nothing changed: followed by connections[0].auth.apiKey is not allowed in a setup file, and exit code 1.
The same rule refuses request headers and safety settings, so a member never has to read a setup file for hidden permissions.
Try it on your own account first
Shell
pancode configure --import lab-pancode.yamlIn a terminal, the command prints what the file will change and asks Apply these changes? [y/N]. Answer n and nothing changes. --yes applies without asking. With --yes, and no LAB_API_KEY exported yet, the import printed:
What you should see
Setup file lab-pancode.yaml will:
Lab gateway. Ask #research-computing for a key; export it as LAB_API_KEY.
add connection lab (openai-compat)
prompts go to https://llm.lab.example.org/v1
model gpt-oss-120b; key from $LAB_API_KEY
chat uses lab / gpt-oss-120b
fleet uses lab / gpt-oss-120b
Imported 1 connection.
connection lab reads its key from $LAB_API_KEY, which is not set in this shell.After Imported, each connection gets one line: lab: ready, or what is still missing, as here.
A plain http address to anything other than this machine or a private network address adds a warning that prompts and keys cross the network unencrypted.
Importing saves the settings without sending a request to the model. Check the route yourself:
Shell
export LAB_API_KEY=...
pancode doctor
pancode connections --probe --connection labThe chat row of doctor should end in endpoint reachable, and the probe's health column should not read down.
Publish it
Put the file at an https address or a path members can read. A fetched file must be https all the way, a redirect to anything else is refused, and the file may be at most 64 KiB.
What a member sees
A member who has never run PanCode runs pancode. At What do you have? they choose A setup file from my lab or team, type the address at Where is the setup file?, and see the same preview under This setup file will: with Apply and Back. A member who already uses PanCode runs:
Shell
pancode configure --import https://lab.example.org/pancode/setup.yamlOnly the lab connection and the chat and fleet routes change. Their other connections, project settings and stored keys stay as they were.
Importing the same file again prints Setup file already imported; nothing changed (lab-pancode.yaml). with the status line, so it is safe to put in a login script with --yes. Without a terminal and without --yes, the command prints the preview and exits 2 without saving.
Change the file later
If you change the settings of a connection a member already has, their import is refused with lab already saved with different settings; nothing changed. and the command to rerun with --replace. Tell members when you change it. A new connection id imports without --replace.
Boundaries
- Importing does not test the model. Members should run
pancode doctorafter setting their key. - The file cannot hand out keys. Each member still gets a key and exports it in their shell.
- A member can change their route afterwards with
/modelorpancode configure; the file is not enforced.