How to Use Novita AI with OpenCode: The Ultimate Setup Guide

opencode-integration

Tired of being locked into a single AI provider for your coding workflow? OpenCode changes the game.

OpenCode is an open-source AI coding agent that brings powerful AI assistance directly to your terminal, IDE, or desktop. What sets it apart? Complete flexibility. Unlike proprietary solutions that lock you into one ecosystem, OpenCode supports 75+ LLM providers through Models.dev integration.

This guide shows you how to supercharge OpenCode with Novita AI’s arsenal of elite coding models—DeepSeek V3.2, GPT OSS 120B, GLM-4.7 and more.

The result is affordable, high-performance AI infrastructure that scales with your needs. Whether you’re exploring unfamiliar codebases, generating production-ready code, or debugging complex issues, this integration delivers powerful capabilities without the high cost.

What is OpenCode?

OpenCode is an open-source agent that helps you write code in your terminal, IDE, or desktop. It’s available as a terminal-based interface, desktop app, or IDE extension with free models included or the ability to connect any model from any provider.

Why developers choose OpenCode:

Any Model Support: OpenCode allows users to integrate and use any AI model from any provider—Claude, OpenAI, Google, Novita AI, or even local models. This flexibility means you’re never locked into a single ecosystem and can choose the best model for each specific task.

Highly Customizable: The tool is highly customizable with plugins and skills, making it adaptable to various workflows. Whether you’re working on backend APIs, frontend components, or data pipelines, OpenCode molds to your development style.

Key features include:

  • LSP enabled: Automatically loads the right Language Server Protocols for the LLM
  • Multi-session: Start multiple agents in parallel on the same project
  • Share links: Share a link to any session for reference or to debug
  • Claude Pro: Log in with Anthropic to use your Claude Pro or Max account
  • ChatGPT Plus/Pro: Log in with OpenAI to use your ChatGPT Plus or Pro account
  • Any model: 75+ LLM providers through Models.dev, including local models
  • Any editor: Available as a terminal interface, desktop app, and IDE extension

Built-in agents:

OpenCode includes two built-in agents you can switch between with the Tab key:

  • build: Default, full access agent for development work
  • plan: Read-only agent for analysis and code exploration (denies file edits by default, asks permission before running bash commands, ideal for exploring unfamiliar codebases or planning changes)

Also included is a @general subagent for complex searches and multistep tasks that can be invoked using @general in messages.

Why Choose Novita AI for OpenCode?

Novita AI provides a powerful AI infrastructure that makes it the ideal choice for OpenCode users. Here’s why:

Support for Top Coding Models

Novita AI supports all leading models optimized for coding tasks:

  • DeepSeek V3.2
  • Qwen3 Coder 480B A35B Instruct
  • OpenAI GPT OSS 120B
  • Minimax M2.1
  • GLM-4.7
  • Kimi K2 Thinking

Advanced Coding Features

Novita AI provides developer-friendly features designed specifically for coding scenarios:

Tool Calling

Enable your AI models to interact with external tools and APIs. This is essential for building complex development workflows and integrations—from database queries to API testing.

Structured Output

Get consistently formatted responses in JSON or other structured formats. Perfect for generating code that integrates directly into your build pipelines without manual formatting.

Prompt Caching

Reduce costs and improve response times by caching frequently used prompts and context. Ideal for repetitive coding tasks and large codebase analysis where you’re querying the same files repeatedly.

Built for Developer Performance

Novita AI’s infrastructure delivers the performance developers need:

High TPS (Tokens Per Second): Fast token generation powered by enterprise-grade GPUs ensures smooth coding workflows without lag. No more waiting for autocomplete suggestions or code explanations.

Low TTFT (Time To First Token): Minimal latency from request to first response, critical for interactive coding sessions where every second counts.

Cost-Effective API Access

Access 200+ AI models through a simple API with competitive pricing that makes AI-powered development accessible for individual developers and teams alike.

OpenCode vs Claude Code

Both OpenCode and Claude Code provide AI-powered coding assistance, but they differ significantly in philosophy and implementation.

OpenCode Advantages

100% Open Source

OpenCode’s complete codebase is available for inspection, modification, and contribution. This transparency ensures security, enables customization, and gives you full control over your development environment.

Provider Agnostic

OpenCode works with Claude, OpenAI, Google, Novita AI, or even local models. As AI models evolve and pricing changes, you’re never locked into a single provider. Switch between models based on task requirements or cost optimization.

Out-of-the-Box LSP Support

OpenCode automatically loads the appropriate Language Server Protocols for your project, providing context-aware intelligence without manual configuration.

TUI Focus

Built by Neovim users and the creators of terminal.shop, OpenCode pushes the limits of what’s possible in terminal interfaces, offering a powerful command-line experience for developers who live in the terminal.

Client/Server Architecture

This architecture allows OpenCode to run on your computer while you drive it remotely from a mobile app or other client. The TUI frontend is just one of many possible clients.

Multi-Session Support

Run multiple agents in parallel on the same project, allowing you to work on frontend, backend, and documentation simultaneously in separate terminal windows.

Claude Code Features

Anthropic Integration: Direct integration with Anthropic’s Claude models, optimized for the Claude ecosystem.

Curated Experience: Single-provider focus ensures a polished, consistent user experience.

Official Support: Backed by Anthropic with dedicated support channels.

Installing OpenCode

The fastest way to install OpenCode:

curl -fsSL https://opencode.ai/install | bash

Tip: Remove versions older than 0.1.x before installing.

Package Managers

# npm/pnpm/yarn/bun
npm i -g opencode-ai@latest

# Windows (Scoop)
scoop install opencode

# Windows (Chocolatey)
choco install opencode

# macOS and Linux (Homebrew - recommended, always up to date)
brew install anomalyco/tap/opencode

# macOS and Linux (official brew formula, updated less frequently)
brew install opencode

# Arch Linux
paru -S opencode-bin

# Any OS
mise use -g opencode

# Nix
nix run nixpkgs#opencode
# or for latest dev branch
nix run github:anomalyco/opencode

Desktop App (BETA)

OpenCode is also available as a desktop application. Download directly from opencode.ai/download.

macOS (Homebrew):

brew install --cask opencode-desktop

Windows (Scoop):

scoop bucket add extras
scoop install extras/opencode-desktop

Installation Directory

The install script respects the following priority order for the installation path:

  1. $OPENCODE_INSTALL_DIR – Custom installation directory
  2. $XDG_BIN_DIR – XDG Base Directory Specification compliant path
  3. $HOME/bin – Standard user binary directory (if exists or can be created)
  4. $HOME/.opencode/bin – Default fallback

Examples:

OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash

XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash

Configuring Novita AI in OpenCode

OpenCode uses the AI SDK and Models.dev to support 75+ LLM providers. Adding Novita AI is straightforward.

Step 1: Get Your Novita AI API Key

  1. Navigate to the Novita AI console
  2. Create an account if you haven’t already
  3. Click “Create API Key”
  4. Copy and save your API key securely

Step 2: Connect Novita AI to OpenCode

Run the /connect command in OpenCode:

/connect

Search for Novita AI in the provider list, then enter your API key when prompted:

┌ API key
│
│
└ enter

That’s it! OpenCode saves your API key and you’re ready to start coding with Novita AI models.

Selecting and Using Models in your OpenCode

Configure Your Model

After connecting Novita AI, you need to configure which model to use in your OpenCode config.

  1. Run the /models command to select a model:
/models
  1. Browse available Novita AI models and select one. For a complete list of available models, visit the Novita AI model catalog.

Working with OpenCode Agents

OpenCode includes two built-in agents that you can switch between using the Tab key.

Build Agent (Default)

The build agent is your primary development companion with full access permissions.

What it can do:

  • Create, modify, and delete files
  • Execute bash commands
  • Install packages
  • Run tests and build scripts
  • Make comprehensive code changes

Use the build agent for active development work where you need full control.

Plan Agent (Read-Only)

The plan agent is designed for safe code exploration and analysis.

Key features:

  • Denies file edits by default: Prevents accidental changes while exploring code
  • Asks permission before running bash commands: Ensures you’re aware of any system interactions
  • Ideal for exploring unfamiliar codebases: Safe way to understand code before making modifications

When to use the plan agent:

  • Analyzing an unfamiliar codebase
  • Reviewing code architecture
  • Planning refactoring strategies
  • Getting suggestions without making changes

General Subagent

OpenCode also includes a general subagent for complex searches and multistep tasks. Invoke it using @general in your messages.

Example:

@general Find all API endpoints in this codebase and list their authentication requirements

The general subagent excels at multi-step workflows that require searching, analyzing, and synthesizing information across your entire project.

Switching Between Agents

Press the Tab key during a session to switch between build and plan agents.

Typical workflow:

  1. Start with plan to explore and understand unfamiliar code
  2. Switch to build when ready to make changes
  3. Return to plan to verify your modifications

For more information about agents, refer to the OpenCode documentation.

Conclusion

Ready to break free from vendor lock-in and supercharge your development workflow?

Integrating Novita AI with OpenCode gives you the best of both worlds: OpenCode’s open-source flexibility meets Novita AI’s powerhouse catalog of elite coding models.

Whether you’re a solo developer or part of a growing team, this integration delivers professional-grade AI capabilities that scale with your needs.

Ready to get started? Sign up for Novita AI today and experience the future of AI-powered coding with OpenCode and Novita AI’s reliable GPU infrastructure.


Discover more from Novita

Subscribe to get the latest posts sent to your email.

Leave a Comment

Scroll to Top

Discover more from Novita

Subscribe now to keep reading and get access to the full archive.

Continue reading