OpenCode

OpenCode is a terminal-first AI coding assistant that enables developers to interact with large language models (LLMs) directly from the command line. It supports interactive prompting, model switching, and configuration-driven customization for advanced workflows.

OpenCode supports OpenRouter as an API provider, allowing you to access a wide range of language models, including Arcee AI’s Trinity models, through a single OpenAI-compatible endpoint. This simplifies setup, enables easy experimentation across models, and centralizes authentication and usage tracking.

This guide walks through how to configure OpenCode to use Trinity models via OpenRouter.


Prerequisites

Quickstart

  1. Run the /connect command and search for OpenRouter.

  2. Enter the API key for the provider.

    ┌ API key
    
    
    └ enter
  3. Many OpenRouter models are preloaded by default, run the /models command to select an Arcee Trinity model (for example, Trinity-Large) from the list.

    /models
  4. Configure Models via opencode.json (optional)

    1. You can add or customize models using the OpenCode configuration file, including their provider:

Last updated