TOOL INTEGRATION
OpenCode
An open-source AI coding agent with a terminal UI. Add HashBid as a custom provider in its config file.
Before you start
Setup
01Install OpenCode
The install script is recommended on macOS / Linux, npm on Windows.
curl -fsSL https://opencode.ai/install | bashnpm install -g opencode-aiopencode --version02Add HashBid as a provider
Create ~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\opencode.json). List each model you want to use under models, using the IDs from the Models page. {env:…} makes OpenCode read the key from an environment variable.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"hashbid": {
"npm": "@ai-sdk/openai-compatible",
"name": "HashBid",
"options": {
"baseURL": "https://hashbidx.ai/v1",
"apiKey": "{env:HASHBID_API_KEY}"
},
"models": {
"<MODEL_ID>": { "name": "<MODEL_ID>" }
}
}
}
}03Set the API key and start
Then open OpenCode in a project directory.
export HASHBID_API_KEY="<YOUR_API_KEY>"
opencode$env:HASHBID_API_KEY="<YOUR_API_KEY>"
opencodeVerify it works
- Type
/modelsand pick a model under HashBid. - Ask
Write a bubble sort in Pythonand watch the answer stream back. - The request shows up on the Logs page of this console.
FAQ
Authentication failed / Invalid API key
Make sure HASHBID_API_KEY is set in the terminal that launched OpenCode, with no extra spaces.
The config must be valid JSON — straight quotes, no trailing commas.
Fetch failed / connection timed out
baseURL must end with /v1.
Model not found
The key under models is sent as-is, so it must match a model ID on the Models page exactly.