Plugin for OpenCode that adds CoreInfra AI Hub as an external model provider.
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 coreinfraDuring authentication, you will need a CoreInfra AI Hub API token.
- 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 thinkingmode is enabled automatically for Anthropic models.
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.
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-20250514To see the full list of available models:
opencode models coreinfraThe 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
| 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. |
Code formatting:
just fmtFull project check:
just check