Amit Jotwani

Amit Jotwani

Thoughts on code, workflows, and developer experience

June 2, 2026

Using Claude Code with DigitalOcean Inference

Got Claude Code working with Claude Opus 4.8 through DigitalOcean Inference.

I wanted to keep using Claude Code as the coding interface, but route requests through DigitalOcean Inference instead of an Anthropic subscription. (For the bigger picture of how I use Claude Code day to day, see My current coding workflow.)

Add the following to ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://inference.do-ai.run",
    "ANTHROPIC_AUTH_TOKEN": "<DO Model Access Key>",
    "ANTHROPIC_MODEL": "anthropic-claude-opus-4.8",
    "MAX_THINKING_TOKENS": "0"
  }
}

A quick breakdown:

  • ANTHROPIC_BASE_URL points Claude Code at the DigitalOcean Inference endpoint.
  • ANTHROPIC_AUTH_TOKEN is your DigitalOcean Model Access Key.
  • ANTHROPIC_MODEL selects the model you want to use.
  • MAX_THINKING_TOKENS is the important one.

Without that last setting, I hit this error:

API Error: 400 "thinking.type.enabled" is not supported for this model.
Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.

From what I understand, Claude Code was sending an older thinking configuration that Opus 4.8 no longer accepts. Setting "MAX_THINKING_TOKENS": "0" essentially disables Claude Code’s explicit thinking budget, and prevents it from sending the older thinking configuration.

After adding that setting, Claude Code connected successfully and started using Opus 4.8 through DigitalOcean Inference.

The nice part is that Claude Code becomes the interface, while the model can come from any provider exposing a compatible endpoint.

To verify that Claude Code is actually using the DigitalOcean endpoint, run /status. You should see something similar to:

Anthropic base URL: https://inference.do-ai.run
Model: anthropic-claude-opus-4.8