# Oh My Pi

Source: https://docs.aicentos.com/en/clients/oh-my-pi

Language: en

> Connect aicentos in Oh My Pi (omp) — add an openai-completions provider in models.yml

Oh My Pi is a fork of Pi with the core rewritten in Rust, and its command is `omp`. It defines providers in `~/.omp/agent/models.yml`; with `baseUrl` / `api` / `apiKey` filled in clearly, it points at aicentos.

## Prerequisites

First create a dedicated key for Oh My Pi in the console (naming it `oh-my-pi` is recommended).

At runtime it needs bun 1.4.4 or later:

```bash
curl -fsSL https://omp.sh/install | sh
```

Homebrew and npm distributions are also available:

```bash
brew install can1357/tap/omp
# or
bun install -g @oh-my-pi/pi-coding-agent
```

## Configuration to fill in

| Field         | Value                                              |
| ------------- | -------------------------------------------------- |
| provider name | Your choice, for example `aicentos`                |
| `baseUrl`     | `https://aicentos.com/v1`                          |
| `api`         | `openai-completions`                               |
| `apiKey`      | The key created in the console                     |
| `models[].id` | A model name from the Model Gallery in the console |

## Setup steps

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

```yaml
providers:
  aicentos:
    baseUrl: https://aicentos.com/v1
    api: openai-completions
    apiKey: sk-your-API-Key
    models:
      - id: your-model-name
        contextWindow: 128000
```

Set it as the default in `~/.omp/agent/config.yml`:

```yaml
modelRoles:
  default: aicentos/your-model-name
```

If you do not want the key in the file, replace `apiKey` with an environment variable reference and `export AICENTOS_API_KEY="sk-your-API-Key"` before starting.

## Test

```bash
omp models aicentos
```

Being able to list the model you just configured means the provider is recognized. Then go into the TUI, send one line to confirm it returns, and finally check usage back in the console.

## Notes

* `api` must be `openai-completions` (or another protocol name it knows); writing `openai` is treated as an unknown protocol.
* It disables a large number of tools by default; when the connection succeeds but it can do nothing, check the tool switches first — this is not an endpoint problem.
* Opening a repository loads project-level configuration and hooks, so confirm the repository is trustworthy before connecting.
* Alpine environments need `libstdc++` and `libgcc` installed separately.

## Related links

* [Oh My Pi provider docs](https://omp.sh/docs/providers)
* [oh-my-pi repository](https://github.com/can1357/oh-my-pi)