CLI / PI AGENT

Pi Agent

Configure Pi Agent with Mengbi Router through its OpenAI-compatible provider.

!

Production integration docs · examples use router-api.mengbi-ai.net and a personal API key placeholder.

01 /

Prepare

Prepare Pi Agent with a personal Mengbi Router key and a current model ID.

Prepare 1

Use the Pi Agent configuration supported by your current installation.

bash
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pi --version

Prepare 2

  • Install the latest stable Pi Agent release.
  • Create a personal Mengbi API key in the console.
  • Copy the exact model ID from the model catalog.

NoteClient configuration fields can change between versions. Prefer the documented OpenAI-compatible or native provider setting.

02 /

Configure

Connect Pi Agent to the endpoint that matches its supported protocol.

Configure 1

Use the Pi Agent configuration supported by your current installation.

json
{
  "providers": {
    "mengbi": {
      "name": "Mengbi Router",
      "baseUrl": "https://router-api.mengbi-ai.net/v1",
      "apiKey": "$MENGBI_ROUTER_API_KEY",
      "api": "openai-completions",
      "models": [
        {
          "id": "gpt-5.6-sol",
          "name": "GPT-5.6 Sol",
          "reasoning": true,
          "input": ["text"],
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "contextWindow": 128000,
          "maxTokens": 16384
        }
      ]
    }
  }
}

Configure 2

Use the Pi Agent configuration supported by your current installation.

bash
export MENGBI_ROUTER_API_KEY="sk-mengbi-xxxxxx"
pi --provider mengbi --model gpt-5.6-sol

Configure 3

Use the Pi Agent configuration supported by your current installation.

NoteClient configuration fields can change between versions. Prefer the documented OpenAI-compatible or native provider setting.

03 /

Verify

Send a small request and check the key, endpoint, and model if it fails.

Verify 1

Use the Pi Agent configuration supported by your current installation.

bash
pi --list-models --provider mengbi

Verify 2

Use the Pi Agent configuration supported by your current installation.

  • Install the latest stable Pi Agent release.
  • Create a personal Mengbi API key in the console.
  • Copy the exact model ID from the model catalog.
  • Keep the key in a local secret store and never commit it.