Oh My Pi

Oh My Pi (omp) is a terminal coding agent. Declare an OpenAI-compatible provider in models.yml, then select models as provider-id/model-id.

Prerequisites

  • Bun or the official installer is available.
  • A ModelGo API key is available from ModelGo Console.
  • You know the logical model ID from the Model Catalog.

1. Install Oh My Pi

bash
bun install -g @oh-my-pi/pi-coding-agent
omp --version

macOS/Linux can also use the official installer:

bash
curl -fsSL https://raw.githubusercontent.com/can1357/oh-my-pi/main/scripts/install.sh | sh

2. Add a ModelGo provider

Edit ~/.omp/agent/models.yml:

yaml
providers:
  modelgo:
    baseUrl: https://api.modelgo.ai/v1
    api: openai-completions
    apiKey: MODELGO_API_KEY
    models:
      - id: your-model-id
        name: ModelGo / your-model-id
        contextWindow: 128000
        maxTokens: 8192

apiKey is the environment variable name:

bash
export MODELGO_API_KEY="sk-your-token"

3. Select and verify

bash
omp --list-models
omp --model modelgo/your-model-id
curl https://api.modelgo.ai/v1/models -H "Authorization: Bearer $MODELGO_API_KEY"

Send a small read-only task in the session.

Troubleshooting

ModelGo is missing from the model list

Check ~/.omp/agent/models.yml, YAML indentation, and restart omp.

401 or endpoint errors

Confirm MODELGO_API_KEY is exported and baseUrl has no duplicate /v1 or full endpoint path.

Related docs