(Experimental) Pi extension for interacting with the API of the UniGPT platform
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Benjamin Hackl 79eb374b74
Some checks failed
CI / test (22) (push) Failing after 0s
CI / test (24) (push) Failing after 0s
CI: move workflow to .github and use a subpath-aware checkout
actions/checkout drops the /git subpath of our Gitea when building the
clone URL. Use ischanx/checkout v6.0.2, pinned to its commit.
2026-11-03 21:33:31 +01:00
.github/workflows CI: move workflow to .github and use a subpath-aware checkout 2026-11-03 21:33:31 +01:00
src Fix loading when installed from git: import openAIResponsesApi from pi-ai/compat 2026-11-03 21:18:44 +01:00
test Fix loading when installed from git: import openAIResponsesApi from pi-ai/compat 2026-11-03 21:18:44 +01:00
.gitignore UniGPT provider for pi 2026-11-03 20:01:28 +01:00
DEVELOPMENT.md CI: move workflow to .github and use a subpath-aware checkout 2026-11-03 21:33:31 +01:00
LICENSE UniGPT provider for pi 2026-11-03 20:01:28 +01:00
package.json Support pi 1.3 and newer 2026-11-03 21:07:18 +01:00
pnpm-lock.yaml UniGPT provider for pi 2026-11-03 20:01:28 +01:00
pnpm-workspace.yaml UniGPT provider for pi 2026-11-03 20:01:28 +01:00
README.md README: no claims about how API keys are issued or revoked 2026-11-03 21:12:30 +01:00
tsconfig.json UniGPT provider for pi 2026-11-03 20:01:28 +01:00

pi-unigpt

Use uniGPT, the University of Graz's AI assistant, inside the pi coding agent.

Once set up, every model your uniGPT account offers appears in pi's model picker, including GPT-4o, GPT-4.1, and the GPT-5 and GPT-6 families. Tools, streaming responses, and image input all work.

What you need

Setup

1. Install the extension

pi install git:imsc.uni-graz.at/git/behackl/pi-unigpt

2. Log in

Start pi (or type /reload if it is already running), then type:

/login unigpt

A dialog asks for your API key. Paste it there, not into the chat. Pi checks the key and tells you how many models you can use.

3. Pick a model

Type /model and choose one of the models listed under unigpt.

That's it. Pi remembers your key and your last model for next time.

Optional: start pi with uniGPT by default. Add this to ~/.pi/agent/settings.json, using any model from the list:

{
  "defaultProvider": "unigpt",
  "defaultModel": "gpt-5.4"
}

Commands

Command What it does
/login unigpt Save your API key (or replace it with a new one)
/model Choose a model
/unigpt-refresh Reload the list of models, e.g. after uniGPT adds new ones
/logout Remove your key from pi

Updating

pi update --extensions

Logging out and uninstalling

To remove your API key, type /logout and choose uniGPT. The uniGPT models disappear from /model until you log in again. This only removes the key from pi; it does not revoke the key at uniGPT.

To uninstall the extension, log out first (uninstalling does not delete the saved key), then run:

pi remove git:imsc.uni-graz.at/git/behackl/pi-unigpt

If you made uniGPT your default, also remove defaultProvider and defaultModel from ~/.pi/agent/settings.json.

Things to know

  • The thinking level setting has no effect. uniGPT decides how much each model reasons; models that reason still do so.
  • Costs are shown as zero. Pi doesn't track uniGPT usage; this does not mean usage is unlimited. Your university's usage rules still apply.

Troubleshooting

  • No uniGPT models in /model: type /unigpt-refresh. It tells you what is wrong, e.g. a rejected key or no network connection.
  • One model always fails with an error: that model may be unavailable on uniGPT's side. Pick another one.
  • pi -p "…" says a uniGPT model was not found: start pi normally once after logging in, so it can load the model list.
  • Installation fails with spawn npm ENOENT: you use pnpm instead of npm. Add "npmCommand": ["pnpm"] to ~/.pi/agent/settings.json and try again.

Still stuck? Open an issue with the output of /unigpt-refresh and the model you used. Never include your API key.

Advanced

Storing the key elsewhere. Pi saves your key unencrypted in ~/.pi/agent/auth.json, readable only by your user account. To keep it out of that file, change the unigpt entry there to read it from an environment variable or a password manager command:

{ "unigpt": { "type": "api_key", "key": "${UNIGPT_API_KEY}" } }
{ "unigpt": { "type": "api_key", "key": "!op read op://Private/uniGPT/credential" } }

Adjusting model limits. Pi knows the context size and output limit of common models. For a model it doesn't recognize, it assumes 128k tokens of context and 16k of output. If you know better, override them in ~/.pi/agent/models.json:

{ "providers": { "unigpt": { "modelOverrides": { "gpt-5.4": { "contextWindow": 200000 } } } } }

Pinning a version. To stay on one release, install with its tag, e.g. pi install git:imsc.uni-graz.at/git/behackl/pi-unigpt@v0.1.0.

Contributing

See DEVELOPMENT.md.

License

MIT