genmux API is now generally available. Read the docs →
genmux API

Blog

Continue (IDE and cn CLI) on genmux: config.yaml and tools

5 min readWritten by genmux API Team


Continue is the open-source assistant that lives in VS Code and JetBrains and, since the cn CLI, in the terminal and in scripts. It is configured from one YAML file, and that file is the entire genmux integration: an openai provider pointed at https://api.genmux.tech/v1. This post is the config, what each field does, and how to run the same setup headless in a script.

config.yaml

Put this in ~/.continue/config.yaml (global) or in a config.yaml you pass to the CLI:

yaml
name: genmux
version: 0.0.1
schema: v1
models:
  - name: DeepSeek V4 Flash
    provider: openai
    model: deepseek-v4-flash
    apiBase: https://api.genmux.tech/v1
    apiKey: nb_live_...
    roles: [chat, edit, apply]
    capabilities: [tool_use]

Field by field:

  • provider: openai — Continue's OpenAI adapter. There is no genmux-specific provider and none is needed: the chat endpoint speaks the OpenAI dialect, including streaming and tool calls.
  • apiBase — the genmux base URL, with the /v1. Continue appends /chat/completions.
  • apiKey — your key. The file can reference an environment variable instead (apiKey: ${{ secrets.GENMUX_API_KEY }} in Continue's syntax) if the config is shared.
  • model — any of the seven tool-capable ids: deepseek-v4-flash, deepseek-v4-pro, deepseek-v3, qwen3-max, qwen3-7-max, doubao-seed-2-pro, doubao-seed-2-code.
  • roles — which jobs this model does (next section).
  • capabilities: [tool_use] — the line that matters most. Continue does not know genmux's ids, so it cannot look up whether a model supports tools; without this line Agent mode falls back to a no-tools chat. With it, Continue sends the tools array and reads tool_calls back.

Add a second entry for the heavier model and switch between them from the model picker:

yaml
  - name: DeepSeek V4 Pro
    provider: openai
    model: deepseek-v4-pro
    apiBase: https://api.genmux.tech/v1
    apiKey: nb_live_...
    roles: [chat, edit]
    capabilities: [tool_use]

The roles: chat, edit, apply

Continue routes different jobs to different models, and roles is where you say which model takes which:

RoleWhat Continue uses it forRecommended
chatThe sidebar conversation and Agent mode, tools includeddeepseek-v4-flash by default, deepseek-v4-pro for hard tasks
editInline "edit this selection" (Cmd/Ctrl+I) — a focused rewrite of a code rangeEither V4 model; Flash is fast enough to feel inline
applyTaking a code block from the chat and merging it into the filedeepseek-v4-flash — this is many short calls, keep it cheap
autocompleteInline completions as you type (fill-in-the-middle)Not listed on purpose

autocomplete is missing from the example for a reason. Continue's autocomplete uses fill-in-the-middle prompts against a completions-style endpoint, which genmux does not expose — only chat completions. Leave a chat model out of that role; it will produce chat-shaped answers where you wanted a line of code.

apply deserves one note. Continue can apply a block with a plain text merge or ask a model to do it; on a model with a 1M context like V4 Flash the model path is reliable and the calls are tiny. Pricing per 1M tokens for the two: Flash $0.198 in / $0.594 out, Pro $0.594 / $1.782.

Agent mode and what tool calls look like

In Agent mode Continue sends its built-in tools — read file, write file, run terminal command, search, and the MCP tools you have added — in the tools array. genmux emulates function calling for the seven models above (the gateway upstream drops tools, so the definitions are rendered into the system prompt and the reply is parsed back); Continue receives standard OpenAI tool_calls, shows the approval card, runs the tool, and sends role: tool back. Two things from that emulation show up in the editor:

  • The definitions count as prompt tokens, roughly 40 per tool plus schema. Continue's set is small, a few hundred tokens; MCP servers you add on top each bring their own.
  • tool_choice: required is a hint the model can ignore. Continue uses auto, and in our 20-task eval V4 Pro made every expected call (20/20) and Flash 19/20 — the details are in the emulated function calling post.

If you want the assistant to also generate images from inside the editor, add the genmux MCP server under mcpServers in the same file: it exposes generate_image and estimate_cost as tools the chat model can call.

Headless: cn -p --auto

The CLI is the same engine without the IDE:

bash
npm i -g @continuedev/cli
cn --config ./config.yaml                        # interactive TUI in the current repo
cn --config ./config.yaml -p --auto "add unit tests for pkg/parse and make them pass"

-p (print) runs one prompt and exits; --auto approves tool calls without asking, which is what a script or a CI step needs. The combination is how we verify each release: a temp repo, this config, cn -p --auto "create hello.txt containing hi", assert the file. It passes on deepseek-v4-flash and qwen3-max against production before every tag.

A few practical points for scripts:

  • Pass the key through the environment rather than the file when the config is in the repo.
  • --auto runs whatever the model asks for, including shell commands. Run it in a container or a throwaway checkout, the same way you would any agent with a terminal tool.
  • Each cn invocation is a handful of chat requests, each a genmux job; GET /v1/generations?capability=text.chat lists them with cost per call, which is a cleaner ledger than parsing CLI output.

Getting started

One config.yaml with provider: openai, apiBase: https://api.genmux.tech/v1 and capabilities: [tool_use] gives Continue, in the IDE and in the terminal, DeepSeek V4 and Qwen3 through one genmux key. The coding agents page has the short version for every client, and the other agents have their own posts — OpenCode, aider, Cline and Roo Code — and the chat endpoint reference is in the docs.

About the author

Written by genmux API Team — genmux API.

More about us