Skip to main content
This page explains how to run models from Modular Cloud on Oh My Pi (omp), a coding agent built on Pi.

Before you begin

Make sure you have:

Connect to the Modular provider

Modular is a built-in provider in Oh My Pi, so you can connect a model from any of our shared endpoints with only an API key.
  1. Start Oh My Pi:
  2. Run the /login modular command and paste your API key. You can skip this step if you set the MODULAR_API_KEY environment variable before you start Oh My Pi.
  3. Run the /model command and choose a Modular Cloud model.
The Oh My Pi model list only includes models on Modular Cloud shared endpoints. The next section describes how to connect a model from a dedicated deployment.

Connect a dedicated deployment

Each dedicated deployment runs on your organization’s own endpoint, so you need to add it to Oh My Pi as a custom provider:
  1. Open your deployment and copy its Dedicated Endpoint and Model ID.
  2. Export your API key as an environment variable:
  3. Open (or create) the ~/.omp/agent/models.yml config file and add a provider for your deployment:
    models.yml
    In baseUrl, paste the dedicated endpoint you copied in step 1 with /v1 appended. Then replace the model ID with your deployment’s model ID. Modular Cloud supports the OpenAI chat completions API, so set api to openai-completions. Avoid naming the provider modular. That ID belongs to the built-in Modular provider, so your settings would override it instead of adding a separate provider.
  4. Start Oh My Pi, run the /model command, and select your deployment’s model.
To see the complete list of configuration options for custom providers, see the Oh My Pi documentation on custom models and providers.