Now live: DeepSeek V4.1 Flash and GLM-5.3, hosted in Australia. Get started →

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.

Hosted in Australia

Set it up in three steps

  1. 1

    Get your key

    Sign up for the Model API, create an API key in the console and save it as an environment variable.

    Terminal
    $ export XINFERENCE_API_KEY=your-key
  2. 2

    Add the provider

    Add Xinference to opencode.jsonc in your project, or to your global OpenCode config to use it in every project.

    opencode.jsonc
    {
      "$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. 3

    Pick the model

    Start OpenCode, run /models and choose DeepSeek V4.1 Flash or GLM-5.3.

    Terminal
    $ opencode

This uses the current OpenCode config format. Older versions use provider, npm and options.baseURL instead.

Code in OpenCode on DeepSeek, hosted in Australia