Liking cljdoc? Tell your friends :D

com.blockether.vis.ext.provider-opencode-go

OpenCode Go (https://opencode.ai/go) static-API-key provider.

OpenCode Go is a flat-rate ($10/month) subscription gateway serving a curated set of open-source coding models from ONE endpoint (https://opencode.ai/zen/go/v1) over TWO wire dialects. Vis surfaces them as a SINGLE first-class provider — :opencode-go — that routes each model to the correct wire automatically:

OpenAI chat wire (/chat/completions, svar default): GLM, Kimi, DeepSeek, MiMo, Hy3.

Anthropic Messages wire (/messages, per-model :api-style :anthropic): MiniMax, Qwen.

svar reads (or (:api-style model-map) (:api-style provider)) at request build time, so a per-model :api-style override on the Anthropic models inside :default-models is all that is needed — one provider, one key, one endpoint, two wires.

Auth lifecycle:

  1. vis-agent providers auth opencode-go persists the key once under ~/.vis/opencode-auth.json as canonical snake_case JSON (api_key / saved_at) — every JSON this repo writes uses snake_case string keys.
  2. Later runs resolve the key from config (~/.vis/config.edn, written by the TUI), then OPENCODE_API_KEY, then the auth file. Config wins so status/limits report the key that model calls actually use; the env var beats the file so CI stays home-directory-free.
  3. vis-agent providers status opencode-go shows the source without exposing the key.
  4. vis-agent providers logout opencode-go deletes the persisted key.
OpenCode Go (https://opencode.ai/go) static-API-key provider.

OpenCode Go is a flat-rate ($10/month) subscription gateway serving a curated
set of open-source coding models from ONE endpoint
(`https://opencode.ai/zen/go/v1`) over TWO wire dialects. Vis surfaces them
as a SINGLE first-class provider — `:opencode-go` — that routes each model to
the correct wire automatically:

  OpenAI chat wire (/chat/completions, svar default):
    GLM, Kimi, DeepSeek, MiMo, Hy3.

  Anthropic Messages wire (/messages, per-model `:api-style :anthropic`):
    MiniMax, Qwen.

svar reads `(or (:api-style model-map) (:api-style provider))` at request
build time, so a per-model `:api-style` override on the Anthropic models
inside `:default-models` is all that is needed — one provider, one key, one
endpoint, two wires.

Auth lifecycle:
  1. `vis-agent providers auth opencode-go` persists the key once under
     `~/.vis/opencode-auth.json` as canonical snake_case JSON
     (`api_key` / `saved_at`) — every JSON this repo writes uses
     snake_case string keys.
  2. Later runs resolve the key from config (`~/.vis/config.edn`, written by
     the TUI), then `OPENCODE_API_KEY`, then the auth file. Config wins so
     status/limits report the key that model calls actually use; the env var
     beats the file so CI stays home-directory-free.
  3. `vis-agent providers status opencode-go` shows the source without
     exposing the key.
  4. `vis-agent providers logout opencode-go` deletes the persisted key.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close