Integrations OpenCode
Use DeepSeek in OpenCode, hosted in Australia
Add the Xinference Model API to OpenCode as an OpenAI-compatible provider and code with DeepSeek V4.1 Flash or GLM-5.3 in Australian data centres.
Set it up in three steps
- 1
Get your key
Sign up for the Model API, create an API key in the console and save it as an environment variable.
$ export XINFERENCE_API_KEY=your-key - 2
Add the provider
Add Xinference to
opencode.jsoncin your project, or to your global OpenCode config to use it in every project.{ "$schema": "https://opencode.ai/config.json", "model": "xinference/deepseek-v4.1-flash", "providers": { "xinference": { "name": "Xinference (Australia)", "env": ["XINFERENCE_API_KEY"], "package": "@opencode/ai/providers/openai-compatible", "settings": { "baseURL": "https://cloud.xinference.co/v1" }, "models": { "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash" }, "glm-5.3": { "name": "GLM-5.3" } } } } } - 3
Pick the model
Start OpenCode, run
/modelsand choose DeepSeek V4.1 Flash or GLM-5.3.$ opencode
This uses the current OpenCode config format. Older versions use provider, npm and options.baseURL instead.



