OpenCode
Prefer an OpenAI-compatible provider and enter the openbulu Base URL, key, and model ID. Advanced parameters depend on the client version.
Protocol: OpenAI Responses (1.x). Base URL: https://openbulu.com/v1. Endpoint: POST /v1/responses.
Configuration example
OpenCode 1.18.35 (2.x uses a different schema)
PowerShell: $env:OPENBULU_API_KEY = "<OPENBULU_API_KEY>"
Bash/Zsh: export OPENBULU_API_KEY="<OPENBULU_API_KEY>"
Create opencode.json in a disposable project folder:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"openbulu": {
"npm": "@ai-sdk/openai",
"name": "OpenBulu",
"options": {
"baseURL": "https://openbulu.com/v1",
"apiKey": "{env:OPENBULU_API_KEY}"
},
"models": { "<MODEL_ID>": { "name": "OpenBulu model" } }
}
}
}
Run: opencode run --model openbulu/<MODEL_ID> "Reply with exactly: OpenBulu connection successful"
Check the /v1/responses call in OpenBulu Usage Logs.Examples use placeholders only. Keep your real API key in an environment variable or the client’s secure credential store.
Setup steps
- Use OpenCode 1.18.35 for this tested path. Set OPENBULU_API_KEY in the current shell, create opencode.json in a disposable project folder from the example, and replace <MODEL_ID> with an exact available ID.
- Run the example opencode run command and confirm the reply is exactly OpenBulu connection successful.
- In OpenBulu Usage Logs, match the request time, model ID, and /v1/responses route. Test file editing separately in a disposable folder and run its test yourself.
Verify setup
Create a key, choose a model available to your account, run a small request in the client, then check its model, result, and charge in Usage Logs. Do not share the full key.
OpenCode 1.18.35 on Windows completed an isolated calculator file-edit task; its independent Node test passed, with matching streaming /v1/responses logs for gpt-5.6-sol. This evidence does not verify another version or model.
Troubleshooting
- The Responses route uses @ai-sdk/openai with baseURL https://openbulu.com/v1. @ai-sdk/openai-compatible is for Chat Completions and was not used in this verified route.
- This configuration targets OpenCode 1.18.35, whose schema uses provider. OpenCode 2.x uses providers and a different package/config format; do not reuse this example.