SupaNexus

Pi

Declare SupaNexus in ~/.pi/agent/models.json as openai-completions, then select it with /model.

1. Get a SupaNexus API key

Sign in to the Developer Console, open your project → API Keys, create a key, and copy the secret immediately (shown once). One project key works across OpenAI-compatible and Anthropic-compatible clients.

2. Install Pi

Install Pi from the official docs, then confirm the agent CLI starts.

# see https://pi.dev for current installers
pi --help

3. Create or edit models.json

Path: ~/.pi/agent/models.json. Add a non-built-in provider with api openai-completions, baseUrl ending in /v1, and at least one model entry (id, name, contextWindow, maxTokens, cost). apiKey can live in the file, auth.json, or CLI --api-key.

{
  "providers": {
    "supanexus": {
      "baseUrl": "<BASE_URL>/v1",
      "api": "openai-completions",
      "apiKey": "sk-snx-...",
      "models": [
        {
          "id": "deepseek/deepseek-chat",
          "name": "DeepSeek Chat",
          "reasoning": false,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 128000,
          "maxTokens": 8192
        }
      ]
    }
  }
}

4. Compat flags (if needed)

If the gateway rejects developer-role messages or reasoning_effort, set provider-level compat.supportsDeveloperRole / supportsReasoningEffort to false so Pi falls back to system messages.

"compat": {
  "supportsDeveloperRole": false,
  "supportsReasoningEffort": false
}

5. Pick a catalog model ID

Use exact IDs from the SupaNexus Models marketplace or GET /v1/models (for example deepseek/deepseek-chat, anthropic/claude-3-5-sonnet). Do not invent vendor-only slugs from other gateways.

6. Reload and select with /model

Restart Pi (or reload models). Run /model or --list-models and pick the SupaNexus entry. Models without auth stay listed but unavailable until the key is configured.

7. Troubleshooting

Models missing: JSON must be valid and under ~/.pi/agent/. 401: apiKey / auth not loaded. Partial OpenAI quirks: adjust compat as above; keep api as openai-completions for Chat Completions gateways like SupaNexus.

Setup guide →