Skip to main content
Configure OpenCode to use Adaptive’s intelligent routing for 60-90% cost savings while maintaining the same AI coding experience.
Save 60-90% on AI development costs with intelligent model routing. Works as a custom provider in OpenCode.

Get Your Adaptive API Key

Sign up here to create an account and generate your API key.

Quick Setup

Run Installer

curl -fsSL https://raw.githubusercontent.com/Egham-7/adaptive/main/scripts/installers/opencode.sh | bash
Follow prompts to complete authentication setup.

Authenticate Provider

opencode auth login
Select “Other” → Enter “adaptive” → Paste your API key

Select Model

Run /models in OpenCode and select “Intelligent Routing” for automatic optimization.

Alternative Setup Methods

export ADAPTIVE_API_KEY='your-api-key-here'
curl -fsSL https://raw.githubusercontent.com/Egham-7/adaptive/main/scripts/installers/opencode.sh | bash

Troubleshooting

  • Check opencode.json syntax is valid JSON
  • Ensure provider ID “adaptive” matches between auth and config
  • Run opencode auth list to confirm credentials were added
  • Regenerate API key from Adaptive dashboard
  • Verify provider ID matches exactly between auth and config
  • Try re-running opencode auth login and selecting “Other”

Next Steps


Was this page helpful? Contact us at info@llmadaptive.uk for feedback or assistance with your OpenCode integration.