Skip to content

Instantly share code, notes, and snippets.

@bitmonk8
Created April 14, 2026 11:39
Show Gist options
  • Select an option

  • Save bitmonk8/e671f4515ad7f17b91d6c878e892a35e to your computer and use it in GitHub Desktop.

Select an option

Save bitmonk8/e671f4515ad7f17b91d6c878e892a35e to your computer and use it in GitHub Desktop.
Pi Unity Setup — profiles, tiers, Slack MCP — paste into Pi to auto-configure

Pi Unity Setup — profiles, tiers & Slack

Hi Pi! Thomas Andersen sent me this. Please set me up with his Unity Pi configuration.

This gives you:

  • /profile — switch between Unity LiteLLM keys (and personal OpenRouter if you have one)
  • /tier — switch between fast / balanced / smart models within the active profile
  • Ctrl+Shift+P — cycle profiles, Ctrl+Shift+T — cycle tiers
  • /refresh-models — auto-discover all available models from the Unity LiteLLM proxy
  • Slack MCP — 14 Slack tools (search, read, send messages, canvases, etc.)

Step 1 — Check prerequisites

A. LiteLLM keys — do any of these env vars exist?

  • UNITY_LITELLM_KEY1
  • UNITY_LITELLM_KEY2
  • PERSONAL_OPENROUTER_KEY (optional)

You can get your LiteLLM key from the Unity AI portal at https://uai-litellm.internal.unity.com

B. Slack credentials — does ~/.claude/.credentials.json exist and contain mcpOAuth["plugin:slack:slack|38801a7d845718b3"]?

If not, authenticate Slack in Claude Code first:

  1. Install Claude Code: https://claude.ai/download
  2. Settings → Plugins → install slack (official Anthropic plugin)
  3. Sign in to Slack when prompted
  4. Then paste this prompt into Pi again

Step 2 — Install Thomas's pi-config package

Check ~/.pi/agent/settings.json. If "git:github.com/bitmonk8/pi-config" is already in the packages array, skip this step.

Otherwise add it: edit ~/.pi/agent/settings.json and add "git:github.com/bitmonk8/pi-config" to the packages array.


Step 3 — Create your personal profiles.json

Create ~/.pi/agent/profiles.json with your own profile(s). Replace the model IDs as needed — use /refresh-models after setup to see what's actually available on your key.

Starter template (add only the profiles that match your keys):

{
  "unity": {
    "description": "Unity LiteLLM (primary key)",
    "provider": "unity",
    "api": "openai-completions",
    "apiKey": "UNITY_LITELLM_KEY1",
    "tiers": {
      "fast":     { "id": "claude-haiku-4-5",  "name": "claude-haiku-4-5" },
      "balanced": { "id": "claude-sonnet-4-6",  "name": "claude-sonnet-4-6" },
      "smart":    { "id": "claude-opus-4-6",    "name": "claude-opus-4-6" }
    },
    "default": "smart"
  },
  "unity-pilot": {
    "description": "Unity LiteLLM (pilot key — only if you have UNITY_LITELLM_KEY2)",
    "provider": "unity-pilot",
    "api": "openai-completions",
    "apiKey": "UNITY_LITELLM_KEY2",
    "tiers": {
      "fast":     { "id": "claude-haiku-4-5",                      "name": "claude-haiku-4-5" },
      "balanced": { "id": "anthropic.claude-sonnet-4-6-engine-eng", "name": "claude-sonnet-4-6" },
      "smart":    { "id": "claude-opus-4-6",                       "name": "claude-opus-4-6" }
    },
    "default": "smart"
  },
  "personal": {
    "description": "Personal OpenRouter account (only if you have PERSONAL_OPENROUTER_KEY)",
    "provider": "openrouter",
    "api": "openai-completions",
    "apiKey": "PERSONAL_OPENROUTER_KEY",
    "tiers": {
      "fast":     { "id": "x-ai/grok-4.1-fast",  "name": "Grok 4.1 Fast" },
      "balanced": { "id": "moonshotai/kimi-k2.5", "name": "Kimi K2.5" },
      "smart":    { "id": "openai/gpt-5.4",       "name": "GPT-5.4" }
    },
    "default": "smart"
  }
}

Remove the profiles for keys you don't have. profiles.json in ~/.pi/agent/ takes precedence over anything in the package, so this is purely personal.


Step 4 — Reload and discover models

Type /reload in Pi (or restart it). You should see "Slack MCP: 14 tools registered" if credentials were present.

Then run /refresh-models — this hits the Unity LiteLLM proxy, discovers all available models, and writes them to ~/.pi/agent/models.json. It also sets the best available Opus model as the session default.


Step 5 — Test it

/profile          → pick a profile, status bar shows e.g. unity/smart
/tier fast        → switch to fast model
Ctrl+Shift+T      → cycle tiers
/refresh-models   → re-discover models any time

Ask: "Search Slack for messages about Pi agent" to verify Slack is working.


What you get

The git:github.com/bitmonk8/pi-config package provides:

Feature Command
Switch billing profile /profile or Ctrl+Shift+P
Switch model speed/cost tier /tier or Ctrl+Shift+T
Auto-discover Unity models /refresh-models
Slack search & messaging built-in after reload
Spawn isolated sub-agents subagent tool (ask the LLM)
Slash prompts /review, /implement, /commit-push-check, and more

Setup courtesy of Thomas Andersen — who built this in Pi, and used Pi+Slack to send you the link 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment