AI assistants
The default environment includes three AI coding assistants. None of them comes with a key: you get your own (free options below) and connect it once. Your settings are saved in your home directory, so you only do this once.
| Assistant | Where | Setup |
|---|---|---|
| Kilo Code | VS Code sidebar | Easiest: add a provider in its settings. |
| opencode | Any terminal | One command. NRP is already defined for you. |
| Posit Assistant | RStudio's AI pane | Through its settings. |
Get a key
Pick one. Both work with every assistant here.
NRP (free)
- Log in once at
nrp.ai. When asked for an identity provider, search for University of California, Berkeley and sign in with your CalNet ID. - Email cboettig@berkeley.edu to be added to our namespace. You can't create a token until this is done.
- Go to
nrp.ai/llmtoken, create a token and copy it somewhere safe.
Faculty can instead request their own namespace from NRP.
You'll need these values:
| Base URL | https://ellm.nrp-nautilus.io/v1 |
| API key | your token |
| Model | for example qwen3, glm-5 or kimi.
Current list |
NRP's models are shared by researchers across the country. They can be slow or briefly unavailable under heavy load; nrp.ai/llm-status shows what's up.
OpenRouter
OpenRouter gives you one key for hundreds of models from many
companies, including some free ones. Create an account and a key at
openrouter.ai/keys. Paid models charge your
account, so check prices before choosing one.
Keep your key private. Never paste it into a notebook, script or file you commit to GitHub. Enter it only in the assistant's own setup screen. If a key leaks, delete it and make a new one.
Kilo Code (VS Code)
- Open VS Code (
/vscode) and click the Kilo Code icon in the left sidebar. - Open its settings and add a provider:
- OpenRouter: choose OpenRouter and paste your key.
- NRP: choose the OpenAI-compatible provider, then enter the base URL, your token and a model name from the table above.
- Pick a model and start a new session.
Kilo's inline autocomplete only works with a few specific services (Kilo's own, Mistral, Inception), not NRP or OpenRouter. Leave it off if Kilo prompts you to sign in for it.
opencode (terminal)
opencode runs in any terminal: VS Code, JupyterLab or RStudio.
With NRP
NRP is already set up as a provider called nrp, with the current model list. You only add
your key:
- In a terminal, run:
opencode auth login - Type other to search, and choose Other. NRP won't be in the list; that's expected.
- For the provider id, type exactly
nrp(lowercase). - You'll see "This only stores a credential for nrp – you will need configure it in opencode.json". Ignore it: that's already done for you.
- Paste your token.
Then start opencode, type /models, and choose an NRP model. Choose one
yourself; otherwise opencode may pick a small model on its own.
With OpenRouter
Run opencode auth login, choose OpenRouter from the list, and paste your
key. Then pick a model with /models.
Inside opencode, /connect does the same thing as opencode auth login.
Posit Assistant (RStudio)
Open the AI pane in RStudio and follow its setup to add a provider. Use an OpenAI-compatible provider:
for NRP, the base URL and token above; for OpenRouter, base URL https://openrouter.ai/api/v1
and your OpenRouter key. See
Posit Assistant's documentation for details.
Gotchas
- The provider id must be exactly
nrp. opencode matches your key to the NRP setup by that name, and a typo isn't flagged when you save it; NRP requests just fail later. Runopencode auth loginagain with the right name.opencode auth listshows what you've saved;opencode auth logoutremoves an entry. - The NRP model list updates on its own each time your server starts, so new NRP
models appear after a restart. Don't copy the list into your own
opencode.json, or it will go out of date. - The built-in NRP provider only exists on this hub, in the standard environments.
Elsewhere, or in a custom image, you'd need to define it yourself in
~/.config/opencode/opencode.json. - Where your settings live: opencode in
~/.config/opencode/(keys in~/.local/share/opencode/), Kilo Code in~/.config/kilo/, Posit Assistant in~/.posit/assistant/. All are in your home directory, so they're kept across restarts. - "Rate limit" or "overloaded" errors on NRP mean the model is busy. Wait a minute or switch to another model.
- Assistants can run commands and edit your files. Read what they propose, and keep your work in git so you can undo changes.