Skip to content

CoreInfraAI/opencode-plugin

Repository files navigation

CoreInfra OpenCode Plugin

Plugin for OpenCode that adds CoreInfra AI Hub as an external model provider.

Installation

Important: requires OpenCode version 1.4.0 or newer

Install the plugin

opencode plugin -g '@coreinfra/opencode-plugin@latest'

Log in by entering the API token

opencode providers login --provider coreinfra

During authentication, you will need a CoreInfra AI Hub API token.

Features

  • Up-to-date model list - the catalog is loaded dynamically from the Hub API on every startup and always reflects its current state. Model capabilities (context limits, reasoning, tool use, etc.) are resolved from the models.dev catalog.
  • OpenAI and Anthropic models - both model families are supported, including GPT-5.x and Claude 4.x.
  • Reasoning support - interleaved thinking mode is enabled automatically for Anthropic models.

Limitations

At the moment, OpenCode supports prices in USD only. Because of that, pricing is not overridden yet: OpenCode shows prices from the original OpenAI/Anthropic API.

Usage

After installation and authentication, models will be available with the coreinfra/ prefix:

opencode run -m coreinfra/gpt-5.4-nano
opencode run -m coreinfra/claude-sonnet-4-20250514

To see the full list of available models:

opencode models coreinfra

Supported Models

The full model list is determined by the Hub contents at startup time. The plugin supports all models listed on this page: https://hub.coreinfra.ai/pricing

Configuration

Environment Variables

Variable Default Description
COREINFRA_HUB_BASE_URL https://hub.coreinfra.ai Base URL of the CoreInfra Hub instance. Overrides the default endpoint for model listings and API proxying.

Development

Code formatting:

just fmt

Full project check:

just check

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors