Z-AI / VS Code
VS Code extension
Sidebar chat, code actions and inline completions in any model the gateway exposes. Works in VS Code, Cursor, VSCodium and Windsurf.
Install
Published to both the VS Code Marketplace and Open VSX so it works in every fork.
Sign in
Open the Command Palette (⌘⇧P) and run Z-AI: Sign in. Paste your zk_live_… key when prompted — it's stored in VS Code SecretStorage (OS keychain), never in plain settings.
Don't have a key yet? Create one here.
Features
- Sidebar chat — streaming responses, multi-turn history, model switcher and an "attach selection" chip that sends the editor selection along with your message.
- Code actions — right-click any selection →Z-AI:
- Explain selection
- Refactor selection
- Generate tests
- Add comments / docstrings
- Status bar model picker — bottom-right shows the current model. Click to switch between any model your key has access to. Loaded live from
/v1/models. - Inline ghost-text completions (opt-in) — autocompletion as you type, like Copilot. Toggle with
Z-AI: Toggle inline completions. - Secure storage — API key kept in VS Code SecretStorage so it never lands in
settings.jsonor git.
Settings
Open Settings → search Z-AI.
| Setting | Default | Notes |
|---|---|---|
| zai.baseUrl | http://127.0.0.1:8011/v1 | Set to https://api.zyoralabs.com/v1 for production |
| zai.defaultModel | openai/gpt-5.4-mini | Used for chat and code actions |
| zai.completionModel | openai/gpt-5.4-mini | Used for inline completions (pick something fast) |
| zai.completions.enabled | false | Master switch for ghost-text suggestions |
| zai.completions.debounceMs | 350 | Wait this long after a keystroke |
| zai.completions.maxTokens | 96 | Max tokens per completion |
| zai.completions.contextLines | 60 | Lines of context (before+after cursor) sent |
Commands
| Command | What it does |
|---|---|
| Z-AI: Sign in | Paste an API key (stored in SecretStorage) |
| Z-AI: Sign out | Forget the API key on this machine |
| Z-AI: Open chat | Focus the chat sidebar |
| Z-AI: Pick model | Live-loaded model picker |
| Z-AI: Explain selection | Explain the highlighted code |
| Z-AI: Refactor selection | Rewrite for clarity, same behavior |
| Z-AI: Generate tests for selection | Idiomatic unit tests |
| Z-AI: Add comments to selection | Add docstrings without changing logic |
| Z-AI: Toggle inline completions | Turn ghost-text on/off |
| Z-AI: Show account info | Org + key + spend in a notification |
Pair with the CLI
Use the CLI alongside the extension for ad-hoc workflows — model arena comparisons, live log tailing, scripting completions. Both share the same gateway and the same key.
bash
npm install -g @zyoralabs/zai-cli
zai login
zai chat -m anthropic/claude-4.5-sonnet "draft a release note for v0.2.0"