@redivo/opencode
v1.2.2
Published
Redivo AI provider plugin for OpenCode — use GPT-5.3, GPT-5.4, GPT-5.5, and more via your Redivo AI account
Readme
@redivo/opencode
Redivo AI provider plugin and setup CLI for OpenCode. Use curated GPT, Gemini, and Claude models via your Redivo AI account.
Features
- Curated models — setup writes the supported Redivo AI model catalog into OpenCode config
- GPT variants — low, medium, high, xhigh reasoning effort for supported GPT models
- Vision & PDF — models support text, image, and PDF input
- Russian-first onboarding — language picker starts with Russian, with English available immediately
- OpenCode-aware setup — detects whether OpenCode is installed and helps you install it first
- Safe config updates — creates a timestamped backup before changing your OpenCode config
- Easy setup — one-command CLI installer
- Future-proof — OAuth login support coming soon
Install
Option 1: One-command setup (recommended)
npx @redivo/opencodeIf your environment does not include npx, use:
npm exec @redivo/opencodeInteractive prompts will:
- Ask whether you want Russian or English first
- Check whether OpenCode is already installed
- If Redivo AI is already configured and a newer package is available, offer a dedicated update action first
- Offer to install OpenCode CLI or Desktop when it is missing
- Add the plugin and Redivo AI model catalog to your OpenCode config
- Save your API key
- Optionally set a default model
- Save a backup of your existing config before any change
OpenCode install behavior
When OpenCode is missing, the CLI guides the user through the official install paths:
CLI / Terminal — uses the official installer:
curl -fsSL https://opencode.ai/install | bashmacOS CLI alternative — available through Homebrew:
brew install anomalyco/tap/opencodemacOS Desktop — uses the official cask:
brew install --cask opencode-desktop
If automatic installation fails, the CLI points the user to the official download page and asks them to rerun setup after installing OpenCode manually.
On first publish of a scoped package, npm requires public access. This package is configured for that with
publishConfig.access = "public".
Option 2: Manual
Add to your ~/.config/opencode/opencode.json. The models block is required for OpenCode to preserve GPT reasoning variants in model listings.
{
"plugin": ["@redivo/opencode@latest"],
"provider": {
"redivo-ai": {
"name": "Redivo AI",
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://ai.redivo.ru/v1",
"apiKey": "sk-your-key-here"
},
"models": {
"gpt-5.5": {
"name": "GPT-5.5",
"limit": {
"context": 258000,
"input": 258000,
"output": 128000
},
"modalities": {
"input": ["text", "image", "pdf"],
"output": ["text"]
},
"variants": {
"low": { "name": "Low", "options": { "reasoningEffort": "low" } },
"medium": { "name": "Medium", "options": { "reasoningEffort": "medium" } },
"high": { "name": "High", "options": { "reasoningEffort": "high" } },
"xhigh": { "name": "XHigh", "options": { "reasoningEffort": "xhigh" } }
}
}
}
}
}
}The setup CLI writes the full 13-model catalog automatically.
Models
| Family | Models exposed |
|---|---|
| GPT | gpt-5.3-codex, gpt-5.3-codex-fast, gpt-5.4, gpt-5.4-fast, gpt-5.4-mini, gpt-5.4-mini-fast, gpt-5.5 |
| Claude | claude-sonnet-4-6, claude-opus-4-6-thinking |
| Gemini | gemini-3-flash-preview, gemini-3.1-pro-preview, gemini-3.1-pro-low, gemini-3.1-pro-high |
The package exposes a curated allowlist rather than mirroring every model from the live /v1/models response.
GPT models include reasoning-effort variants; Claude and Gemini entries are exposed without guessed family-specific variant payloads.
CLI Commands
# Configure (or reconfigure)
npx @redivo/opencode
# Same thing without npx
npm exec @redivo/opencode
# Configure project-level only
npx @redivo/opencode --local
# Project-level without npx
npm exec @redivo/opencode -- --local
# Update API key
npx @redivo/opencode
# → Select "Update API key"
# Update an existing stale or local plugin install
npx @redivo/opencode
# → Select "Update installed Redivo AI plugin"
# Remove Redivo AI from config
npx @redivo/opencode
# → Select "Remove Redivo AI configuration"The installed CLI command name is:
redivoSo after a global install you can also run:
npm install -g @redivo/opencode
redivoThe setup flow supports:
- Russian-first language selection
- OpenCode detection before Redivo configuration
- dedicated update action when an older or local
file:plugin install is detected - CLI vs Desktop install guidance when OpenCode is missing
- timestamped config backups such as
opencode.json.backup-YYYYMMDD-HHMMSS
Getting an API Key
- Go to ai.redivo.ru
- Sign in to your account
- Navigate to API Keys
- Create a new key and copy it
Updating
If you already have Redivo AI configured, just run the setup command again. When the CLI detects a stale local install or an older installed package, it will surface Update installed Redivo AI plugin as the first action and then:
- rewrite stale
file:dependencies in the OpenCode package directory to the current published npm range - refresh
opencode.jsonandtui.jsonback to@redivo/opencode@latest - remove stale local plugin artifacts and cached OpenCode package copies
- run
npm installin the OpenCode config directory so the new package is picked up immediately
You can still update manually if needed:
# Update the package globally
npm update -g @redivo/opencode
# Or specify a version in opencode.json
{
"plugin": ["@redivo/[email protected]"]
}License
MIT
