Skip to content

OpenCode

OpenCode is an open source AI coding agent. You can use Aqueduct as a provider by adding it to your OpenCode configuration.

Tip

See the OpenCode docs for general configuration and the custom provider guide for details.

Setup

1. Configure the provider

Add Aqueduct to your OpenCode config (opencode.json in your project root, or ~/.config/opencode/opencode.jsonc for global settings):

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "aqueduct": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Aqueduct",
      "options": {
        "baseURL": "https://aqueduct.ai.datalab.tuwien.ac.at/v1"
      },
      "models": {
        "glm-5.2-744b-preview": {
          "name": "GLM 5.2",
          "interleaved": { "field": "reasoning_content" },
          "options": {
            "chat_template_kwargs": {
              "thinking": true,
              "reasoning_effort": "high"
            }
          },
          "variants": {
            "high": {
              "chat_template_kwargs": {
                "thinking": true,
                "reasoning_effort": "high"
              }
            },
            "max": {
              "chat_template_kwargs": {
                "thinking": true,
                "reasoning_effort": "max"
              }
            }
          }
        },
        "qwen-3.5-397b": {
          "name": "Qwen 3.5 397B"
        },
        "qwen-3.6-35b": {
          "name": "Qwen 3.6 35B"
        },
        "deepseek-v4-flash-284b": {
          "name": "DeepSeek V4 Flash",
          "interleaved": { "field": "reasoning_content" },
          "options": {
            "chat_template_kwargs": {
              "thinking": true,
              "reasoning_effort": "high"
            }
          },
          "variants": {
            "high": {
              "chat_template_kwargs": {
                "thinking": true,
                "reasoning_effort": "high"
              }
            },
            "max": {
              "chat_template_kwargs": {
                "thinking": true,
                "reasoning_effort": "max"
              }
            }
          }
        }
      }
    }
  }
}

Key settings

  • "aqueduct" – the provider ID you'll reference in /connect.
  • "npm": "@ai-sdk/openai-compatible" – Aqueduct speaks the OpenAI API.
  • "options.baseURL" – Aqueduct's API base URL.
  • "models" – maps Aqueduct model IDs to display names. Update as models change (see available models).
  • "interleaved" / "options.chat_template_kwargs" / "variants" – enables thinking for the reasoning models. deepseek-v4-flash-284b and glm-5.2-744b-preview both support high and max reasoning efforts; the variants expose /models-{variant} to switch efforts on the fly.

2. Add your API key

Run /connect in OpenCode, select Aqueduct as the provider, and paste your API key (get one at aqueduct.ai.datalab.tuwien.ac.at).

3. Start coding

cd /path/to/your/project
opencode

Run /init to let OpenCode analyze your project, then use /models to pick an Aqueduct model.