OpenCode
Connect OpenCode Desktop to Routescope through a custom OpenAI-compatible provider
Keep these values handy
OpenCode Desktop connects to Routescope through Custom Provider:
- Provider ID:
routescope - Display Name:
Routescope - Base URL:
https://api.routescope.ai/v1 - API Key: full
sk-... - Model: an account-enabled model such as
gpt-5.4
Step 1: Create a Key in Routescope
Follow Get Base URL and API Key to create a token and copy the full sk-... secret. If OpenCode is a separate use case, create a dedicated token for easier quota and usage tracking.
Step 2: Parameter Mapping
| OpenCode Field | Value | Notes |
|---|---|---|
| Provider ID | routescope | Unique provider identifier; lowercase is recommended |
| Display Name | Routescope | Only affects UI display |
| Base URL | https://api.routescope.ai/v1 | /v1 is required |
| API Key | sk-... | Use the full secret and keep the sk- prefix |
| Model | gpt-5.4 or similar | Replace with an available model |
Step 3: Open OpenCode Settings
In OpenCode Desktop, click the settings button in the lower-left corner.
Step 4: Open Providers
In settings, choose Providers from the left menu. If Custom Provider is not immediately visible, click Show More Providers.
Step 5: Choose Custom Provider
Find Custom or Custom Provider in the provider list and click Connect.
Step 6: Fill in the Routescope Configuration
| Field | Value |
|---|---|
| Provider ID | routescope |
| Display Name | Routescope |
| Base URL | https://api.routescope.ai/v1 |
| API Key | sk-your-full-secret |
| Model ID | For example gpt-5.4 |
| Model Display Name | For example GPT-5.4 |
Use a model available to your account
gpt-5.4 is only an example. Use a model enabled for your account and allowed by the current token.
Step 7: Choose a Model and Verify
Reply with "OpenCode is connected to Routescope", then list the top-level files in the current project.FAQ
Should Provider ID be Routescope or routescope?
Use routescope. Provider ID is an internal identifier, and many versions prefer lowercase letters, digits, hyphens, or underscores. Display Name can be Routescope.
What should Base URL be?
Use https://api.routescope.ai/v1. Do not use only https://api.routescope.ai, and do not duplicate it as https://api.routescope.ai/v1/v1.
What if I cannot find the model I just added?
Return to Settings > Providers and confirm the custom provider was saved. Then check that the model ID exactly matches a model available in the Routescope console.
What should I do for 401 / 403?
Check whether the API Key is complete, whether Base URL includes /v1, whether the model is allowed by the token, and whether the token is expired, disabled, or out of quota.
How is this guide?
Last updated on