OpenCode
Pair-programming agent with a config-driven provider list.
OpenCode reads its providers from a JSON config file. Add FreeTheAi as a custom provider with the OpenAI-compatible adapter and you can pick any FreeTheAi alias as the active model.
Connect OpenCode to FreeTheAi.
- 1
Open the OpenCode config file
Press Ctrl + O inside OpenCode and paste the path. On Windows, replace YOUR_USER with your Windows username.
text C:/Users/YOUR_USER/.config/opencode/opencode.json - 2
Replace the file contents
Wipe the file and paste the FreeTheAi provider block. Drop in your FreeTheAi key from /signup and any aliases you want from the catalog.
json { "$schema": "https://opencode.ai/config.json", "provider": { "freetheai": { "name": "FreeTheAi", "npm": "@ai-sdk/openai-compatible", "options": { "apiKey": "PASTE_YOUR_FREETHEAI_KEY", "baseURL": "https://api.freetheai.xyz/v1" }, "models": { "bbg/deepseek-ai/DeepSeek-V4-Pro": { "name": "DeepSeek V4 Pro", "limit": { "context": 50000, "output": 32000 } }, "bbl/gpt-5.4-mini": { "name": "GPT 5.4 Mini", "limit": { "context": 80000, "output": 32000 } } } } } } - 3
Save and reload
Press Ctrl + S to save, then Ctrl + Shift + P and run Developer: Reload Window. OpenCode will pick up the new provider on reload.
- 4
Pick a FreeTheAi model
Open the model picker in OpenCode and switch to one of the aliases you added. The OpenAI-compatible adapter handles streaming and tool calling automatically.
Models that pair well with OpenCode.
-
bbg/deepseek-ai/DeepSeek-V4-Pro -
bbl/gpt-5.4-mini -
bbg/moonshotai/Kimi-K2.6
See the full live catalog at /models. Aliases are stable; pricing on the free tier stays $0.
Common gotchas.
- OpenCode uses the npm `@ai-sdk/openai-compatible` adapter under the hood, so you can keep adding any FreeTheAi alias under `models` without restarting.
- If `Developer: Reload Window` does not show your provider, double check the JSON saved without trailing commas.
- Use exact aliases from /models (for example `bbg/deepseek-ai/DeepSeek-V4-Pro`). Strip any leading `freetheai/` if a copy-paste added one.