A small, dependency-free VS Code extension for any OpenAI-compatible LLM
gateway. The default base URL is https://daoxe.com/v1, but it's a one-field
change, so this works against any OpenAI-compatible endpoint.
- Bring your own key. The key lives in VS Code's encrypted SecretStorage
(via
DaoXE: Set API Key), or theDAOXE_API_KEY/OPENAI_API_KEYenvironment variable, or adaoxe.apiKeysetting. It is never hardcoded and never logged. - Verify the endpoint honestly.
DaoXE: Test EndpointcallsGET /v1/modelsand then streams a one-word chat probe, reporting time-to-first-token, total latency, delta count, and whether the response actually streamed. - Account-scoped discovery.
DaoXE: List ModelscallsGET /v1/modelsso you copy an exact, real model id instead of guessing from a blog post. - Work in the editor. Complete/continue or rewrite the current selection; tokens stream live into the DaoXE output panel and the result is applied to your document.
| Command | What it does |
|---|---|
| DaoXE: Test Endpoint (models + streaming chat) | GET /v1/models + a tiny streaming chat probe; prints latency / TTFT / streaming diagnostics to the DaoXE output panel. |
| DaoXE: List Models | Lists the models your key can call (GET /v1/models) in a Quick Pick; Enter copies an id, with an option to set it as the default model. |
| DaoXE: Complete / Continue Selection | Streams a natural continuation of the selected text/code and inserts it after the selection. |
| DaoXE: Rewrite Selection… | Pick a preset (refactor, add comments, fix bugs, translate, …) or a custom instruction; replaces the selection with the streamed result. |
| DaoXE: Set / Clear API Key | Store or remove the key in encrypted SecretStorage. |
Rewrite Selection and Complete Selection are also on the editor
right-click menu when you have text selected. A status-bar item (✨ DaoXE)
opens a quick action menu.
- Install the extension (from the Marketplace / Open VSX once published, or the
local
.vsix— see below). - Run DaoXE: Set API Key and paste your own key from the gateway dashboard.
- (Recommended) Run DaoXE: List Models to find an exact model id, then Set as Default Model.
- Run DaoXE: Test Endpoint to confirm connectivity + streaming, then use Complete / Rewrite on a selection.
| Setting | Default | Notes |
|---|---|---|
daoxe.baseUrl |
https://daoxe.com/v1 |
OpenAI-compatible root. |
daoxe.model |
"" |
Exact, account-scoped id (use List Models). |
daoxe.apiKey |
"" |
Optional; prefer SecretStorage or env vars. Don't commit settings.json. |
daoxe.systemPrompt |
(coding assistant) | Sent with Complete / Rewrite. |
daoxe.temperature |
0.3 |
Sampling temperature. |
daoxe.maxTokens |
1024 |
Max tokens for Complete / Rewrite. |
daoxe.timeoutMs |
60000 |
Per-request timeout. |
Key precedence: SecretStorage → daoxe.apiKey setting → DAOXE_API_KEY →
OPENAI_API_KEY.
This is plain JavaScript with no build step and no runtime dependencies
(only Node's built-in https). To hack on it:
git clone https://github.com/seven7763/daoxe-vscode
cd daoxe-vscode
npm install # dev-only: types + vsce (optional, for editor + packaging)
# Press F5 in VS Code to launch an Extension Development Host.
npm run package # builds a .vsix with @vscode/vsce (does NOT publish)- Provider-neutral. Point
Base URLat any OpenAI-compatible endpoint; no telemetry, no vendor whitelist. - Model ids are account-scoped; List Models is the source of truth for what your key can call.
- A request may be billed by your provider; the Test Endpoint probe keeps its
request tiny (
max_tokens: 16).
- llm-daoxe — the same BYOK,
OpenAI-compatible workflow for Simon Willison's
llmCLI (llm -m daoxe/<model> "…"). - DaoXE-AI — OpenAI-/Anthropic-compatible gateway setup examples for Cursor, Claude Code & Cline.
- llm-honesty-probe — provider-neutral checks on whether an endpoint serves the model it claims.
Built by people who work on daoxe, an OpenAI-compatible, multi-model LLM gateway (one key, many models). It is not available in mainland China. The default base URL and the "Open daoxe.com" action point to daoxe, but the extension works against any OpenAI-compatible endpoint and privileges none. daoxe.com
MIT — the full text ships in the LICENSE file inside this extension.