Skip to content

Documentation Pi / Oh My Pi

Tool integrations

Pi / Oh My Pi

Use separate configuration formats for Pi and Oh My Pi.

Before you start#

Install Pi or Oh My Pi and prepare a key from the console. Export the key in the terminal that starts the tool:

Shell
export MORPH_API_KEY="your-api-key"

Pi#

Add morph under providers in ~/.pi/agent/models.json. Keep existing providers. This example follows the Pi 1.3.0 configuration format.

models.json
{
  "providers": {
    "morph": {
      "baseUrl": "https://api.dev.morphfactory.io/v1",
      "api": "openai-completions",
      "apiKey": "$MORPH_API_KEY",
      "compat": { "supportsDeveloperRole": false },
      "models": [
        { "id": "motif/motif-3", "name": "Motif-3", "input": ["text"], "reasoning": true }
      ]
    }
  }
}

supportsDeveloperRole: false avoids sending a developer role to a gateway that accepts system, user, assistant and tool roles. Keep this compatibility setting for this example.

Shell
pi --provider morph --model motif/motif-3

Oh My Pi#

Add the provider to ~/.omp/agent/models.yml (default profile). Keep the indentation and existing entries. Unlike Pi, this format names the environment variable without $.

models.yml
providers:
  morph:
    baseUrl: https://api.dev.morphfactory.io/v1
    api: openai-completions
    apiKey: MORPH_API_KEY
    models:
      - id: motif/motif-3
        name: Motif-3
Shell
omp --model morph/motif/motif-3

Troubleshooting#

For a role-related 422 in Pi, check the compat block. For a 401 in Oh My Pi, check that apiKey is MORPH_API_KEY without $ and that the variable exists in the launching terminal. Ask a short text question after selecting the model.

See the official Pi model configuration, Oh My Pi configuration and API troubleshooting.