Briefing

DigitalOcean Launches Inference Router for Cost‑Effective AI Coding

ai-dev
by Musa Malik · OpenAI

Configure OpenCode to use DigitalOcean’s Inference Router by setting the model field to 'router:your-router-name' and connect via /connect to automatically route requests to the most cost‑effective model.

What to do now

Set up an Inference Router in DigitalOcean’s Model Studio, connect OpenCode with /connect, and start using the router to route coding requests automatically.

Summary

DigitalOcean has announced the Public Preview of its Inference Router, a new tool that dynamically routes AI requests to the most appropriate model based on latency, cost, and output quality. The router is part of DigitalOcean’s AI‑Native Cloud and can be created from the router catalog or built via API or UI, then used by setting the model field to “router:your‑router‑name” in any OpenAI‑compatible API call. The integration is now natively supported in OpenCode, the popular open‑source coding harness that has earned over 160,000 GitHub stars, eliminating the need to manually edit opencode.json for each new model. DigitalOcean’s demo at Deploy 2026 showed OpenCode automatically selecting the right model in real time, saving developers from costly frontier‑model usage on trivial tasks.

The Inference Router solves the problem of one‑size‑fits‑all model usage by analyzing each request and routing it to the best model, thereby reducing token usage and inference costs while maintaining desired quality. Users can choose from preset routers or create custom ones, and the router handles GPU management and infrastructure automatically. The router also provides a unified way to control, optimize, and evaluate inference across multiple providers, making cost‑aware routing the default for coding agents. Developers can connect OpenCode to DigitalOcean with the /connect command, log in, and immediately see their routers in the Model Selection tab, enabling instant cost‑effective AI coding.

Key changes

  • Inference Router dynamically routes requests to the best model based on latency, cost, and quality
  • No GPU management or infrastructure required; use via API or UI
  • OpenCode now supports routers and DigitalOcean serverless inference out of the box
  • Integration steps: launch OpenCode, /connect, login, select router
  • Previously, OpenCode required manual editing of opencode.json; now automatic
  • Router can be created from the router catalog or built via API
  • Router uses preset or custom configurations
  • Routing saves cost by avoiding frontier models for trivial tasks

Affects

internal

Customer impact

Analyzing matches…

Ask about this story

Impact on an agency? Which customers? Compare historically Risks of waiting