Agent Quick Start
Connect OpenCode to Tokatlas
Configure OpenCode with a Tokatlas key, endpoint, and enabled model.
Before You Start
Install OpenCode from its official documentation. This example follows the v1 provider configuration; v2 uses a different providers schema.
Prepare a Tokatlas API key and a model enabled for your account. Replace all YOUR_... placeholders. Back up existing settings before merging changes.
Connection Settings
| Setting | Value |
|---|---|
| Provider name | Tokatlas |
| Protocol | Chat Completions |
| Endpoint / Base URL | https://api.tokatlas.ai/v1 |
| API Key | YOUR_TOKATLAS_API_KEY |
| Model ID | YOUR_TOKATLAS_MODEL_ID |
Setup
- Run
/connect, choose Other, enter provider IDtokatlas, and save your Tokatlas key. - Merge the example into project
opencode.json. Replace the model placeholder in both locations. - Run
/modelsand select the Tokatlas model. Create a new session and test a small project task.
Configuration Example
json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"tokatlas": {
"npm": "@ai-sdk/openai-compatible",
"name": "Tokatlas",
"options": {
"baseURL": "https://api.tokatlas.ai/v1"
},
"models": {
"YOUR_TOKATLAS_MODEL_ID": {
"name": "Tokatlas Model"
}
}
}
},
"model": "tokatlas/YOUR_TOKATLAS_MODEL_ID"
}Compatibility Notes
The credential ID must match provider.tokatlas. @ai-sdk/openai-compatible selects Chat Completions; models requiring Responses need the corresponding OpenAI adapter. For v2, use the v2 provider guide rather than pasting this v1 schema.
Verify and Troubleshoot
- Open a new conversation and send “Reply with OK only”; check that text returns.
- Check Tokatlas usage for a successful request at the same time with the configured model.
- If you need tools, ask the client to list files in a test directory and check that the tool result returns to the conversation.
- If step 1 fails, test the key and model directly using API Basics. If that succeeds, troubleshoot client settings below.
| Problem | Check |
|---|---|
401 / 403 | Re-enter the Tokatlas key without quotes or spaces; check the auth mode and model access. |
404 | Compare the full request URL with the table above; remove a duplicated /v1 or endpoint suffix. |
| Unknown model | Copy an enabled ID from the model list, save it, and select that model in a new chat. |
| Tool failure | Model capabilities and client protocol support. |
| Changes ignored | Select the Tokatlas provider/profile, fully quit the client, and reopen it. |
