Skip to content

Pi

Pi is a minimal terminal AI coding harness. You can use Aqueduct as a provider by adding it to your Pi configuration.

Tip

See the Pi documentation for general configuration of custom models and providers.

Setup

1. Configure the provider

Add Aqueduct to your Pi model config (~/.pi/agent/models.json):

{
  "providers": {
    "aqueduct": {
      "baseUrl": "https://aqueduct.ai.datalab.tuwien.ac.at/v1/",
      "api": "openai-completions",
      "apiKey": "sk-PASTE-YOUR-AQUEDUCT-KEY-HERE",
      "models": [
        {
          "id": "deepseek-v4-flash-284b",
          "name": "DeepSeek V4 Flash",
          "input": ["text"],
          "contextWindow": 393216,
          "maxTokens": 32000,
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "reasoning": true,
          "thinkingLevelMap": {
            "minimal": null,
            "low": null,
            "medium": null,
            "high": "high",
            "xhigh": null,
            "max": "max"
          },
          "compat": {
            "thinkingFormat": "chat-template",
            "chatTemplateKwargs": {
              "thinking": { "$var": "thinking.enabled" },
              "reasoning_effort": { "$var": "thinking.effort" }
            }
          }
        }
      ]
    }
  }
}

Key settings

  • "baseUrl" – Aqueduct's OpenAI-compatible API base URL.
  • "api" – Aqueduct speaks the OpenAI API (openai-completions).
  • "apiKey" – Replace the placeholder with your own Aqueduct API key (see below).
  • "id" – Maps to the DeepSeek model ID on Aqueduct.
  • "thinkingLevelMap" – deepseek supports high and max reasoning efforts; other levels are hidden.
  • "compat.thinkingFormat"chat-template with the DeepSeek chat template kwargs for reasoning control.

2. Add your API key

Replace the sk-PASTE-YOUR-AQUEDUCT-KEY-HERE placeholder in your models.json with a real Aqueduct key. Get one at aqueduct.ai.datalab.tuwien.ac.at:

"apiKey": "sk-YOUR-REAL-AQUEDUCT-KEY"

Tip

If you prefer not to store your key in plain text, Pi also supports reading it from an env variable (e.g. "apiKey": "$AQUEDUCT_API_KEY") or a stored credential via /login aqueduct. See the Pi documentation for the supported value syntax.

3. Start coding

pi

Then use /model to select DeepSeek V4 Flash and start a session with it:

pi -m deepseek-v4-flash-284b

About DeepSeek V4 Flash

DeepSeek V4 Flash is a text-only model — it does not support image inputs. Reasoning efforts are limited to high and max; use Aqueduct's Qwen models if you need image input.