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.

AssistantWhereSetup
Kilo CodeVS Code sidebarEasiest: add a provider in its settings.
opencodeAny terminalOne command. NRP is already defined for you.
Posit AssistantRStudio's AI paneThrough its settings.

Get a key

Pick one. Both work with every assistant here.

NRP (free)

  1. 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.
  2. Email cboettig@berkeley.edu to be added to our namespace. You can't create a token until this is done.
  3. 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 URLhttps://ellm.nrp-nautilus.io/v1
API keyyour token
Modelfor 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)

  1. Open VS Code (/vscode) and click the Kilo Code icon in the left sidebar.
  2. 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.
  3. 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:

  1. In a terminal, run:
    opencode auth login
  2. Type other to search, and choose Other. NRP won't be in the list; that's expected.
  3. For the provider id, type exactly nrp (lowercase).
  4. 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.
  5. 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