Skip to content

Repository files navigation

DaoXE for VS Code (OpenAI-compatible)

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 the DAOXE_API_KEY / OPENAI_API_KEY environment variable, or a daoxe.apiKey setting. It is never hardcoded and never logged.
  • Verify the endpoint honestly. DaoXE: Test Endpoint calls GET /v1/models and 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 Models calls GET /v1/models so 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.

Commands

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.

Setup

  1. Install the extension (from the Marketplace / Open VSX once published, or the local .vsix — see below).
  2. Run DaoXE: Set API Key and paste your own key from the gateway dashboard.
  3. (Recommended) Run DaoXE: List Models to find an exact model id, then Set as Default Model.
  4. Run DaoXE: Test Endpoint to confirm connectivity + streaming, then use Complete / Rewrite on a selection.

Settings

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_KEYOPENAI_API_KEY.

Local development

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)

Notes

  • Provider-neutral. Point Base URL at 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).

Related

  • llm-daoxe — the same BYOK, OpenAI-compatible workflow for Simon Willison's llm CLI (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.

Disclosure

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

License

MIT — the full text ships in the LICENSE file inside this extension.

About

VS Code extension for any OpenAI-compatible LLM gateway (default DaoXE): test endpoint, list models, complete/rewrite selection. Bring your own key.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages