Amit Jotwani

Amit Jotwani

Thoughts on code, workflows, and developer experience

June 2, 2026

Using Pi with DigitalOcean Inference

I’d been hearing a lot of good things about Pi as a coding harness and wanted to give it a whirl. (I’ve mostly been on Claude Code — see my current coding workflow.)

I also wanted to use DigitalOcean Inference for model access rather than configuring individual provider accounts. You’ll need a model access key — see how to manage model access keys.

The configuration lives in: ~/.pi/agent/models.json

Here’s the model definition I ended up using:

"digitalocean-anthropic": {
  "baseUrl": "https://inference.do-ai.run",
  "api": "anthropic-messages",
  "apiKey": "DO_API_KEY",
  "models": [
    {
      "id": "anthropic-claude-opus-4.8",
      "name": "Anthropic Claude Opus 4.8 (messages API)",
      "reasoning": false,
      "input": ["text"],
      "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
      "contextWindow": 200000,
      "maxTokens": 4096
    }
  ]
}

The important bit is: "api": "anthropic-messages". Without that setting, I was getting:

DigitalOcean proxy rejects store parameter: 400 Extra inputs are not permitted

After a bit of digging, I found this GitHub issue:

DigitalOcean proxy rejects store parameter: 400 Extra inputs are not permitted (#2539)

The issue explains that Pi’s OpenAI-compatible provider path sends a store parameter that DigitalOcean’s inference proxy rejects. Switching to Anthropic’s Messages API avoids that issue and works correctly with DigitalOcean’s Claude endpoints.

An added bonus is that using Anthropic’s Messages API also allows you to take advantage of prompt caching and cache tokens. That’s especially useful when working on larger codebases where the same files and context are being sent repeatedly.

Once I added that, Pi connected successfully and started using Claude Opus 4.8 through DigitalOcean Inference.